-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Terminal commands on new element api should return actual result from Selenium. #3899
Comments
@garg3133 I want to work on this issue. |
Sure @yashPratp983, this issue could be a little tricky to get started with but you can surely give it a try. What we want here right now is for commands to just return the error if some error has occurred, returning |
@yashPratp983 Were you able to make any progress on this? |
can you explain on how to re-create these errors? I've started to work on it |
Hey @garg3133 I just hit a way to solve this one i.e. to put a check over the result returning from selenium, whether it consists of any errors, if yes, then return that error else return by default WebElement object. Is it OK to solve ? |
Terminal commands like
click()
,sendKeys()
, etc. available on the new element API should return the result as returned by Selenium instead of returning aWebElement
, as was the case with the commands available on the older element API.Right now, these commands return a
ScopedWebElement
instance when used withoutawait
, which is not useful at all. And on usingawait
with these commands, aWebElement
instance of the previous element is returned, which also does not make any sense since the terminal commands are not meant to be chained.Instead, the exact result as returned by Selenium should be reported back to the users (which is
null
for most of these commands).This is also important because right now due to this, errors from Selenium are also not reported back to the users.
This can potentially be solved by reverting this commit, and here is a discussion related to this change.
The text was updated successfully, but these errors were encountered: