Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add testing methods like find_element_by_xpath_ok() #472

Open
bschmalhofer opened this issue Apr 11, 2021 · 3 comments
Open

Add testing methods like find_element_by_xpath_ok() #472

bschmalhofer opened this issue Apr 11, 2021 · 3 comments

Comments

@bschmalhofer
Copy link
Contributor

My understanding is the S::R::D::find_element() throws an exception when the element is not found. Consequently the methods T::S::R:D::find_element_ok() and T::S::R::D::find_no_element_ok() throw an exception when the assertion is not valid.

For Selenium::Remote::Driver there is the workaround to use the methods like 'find_element_by_()' if one does not want the exception. Would it make sense to add testing methode find_element_ok_by_*()and 'find_no_element_by_()' for Test::Selenium::Remote::Driver ? This approach should be gently on existing code.

@teodesian
Copy link
Owner

seems like a good idea to me. I would say that we should return undefined and ensure $@ is set appropriately in these cases.

I probably won't get time to write a patch until later this week.

@teodesian
Copy link
Owner

Nice, looks like you have a PR for this one.

I'll look at it tomorrow.

@teodesian
Copy link
Owner

disregard prior comment, pr unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants