-
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
Add missing isPresent
command in new Element API
#4055
Comments
pls can i be assigned to work on this issue |
@aditya123473892 I'll assign you this issue as soon as you come up with a potential solution for this issue. Feel free to open a PR. |
hey @garg3133 do I have to create the function |
@subhajit20 You've already worked on similar PRs, it'd be better if you work on a different issue now. I'm creating these issues for beginners who are new to the project and not just to get them done. I'll try to review your PRs tomorrow. |
Cool, but still I have made a pr, if you will have time then check that once. |
hey @garg3133 , thanks! |
It seems like a good first issue to try out and get used to the codebase. The guidelines provided seems very apt and precise but is the issue still open to PRs? Because quite a few PRs were raised so I am doubtful . It'd be very nice if you let me know @garg3133 |
@garg3133 the test is passing in ecosia.js file after initializing nightwatch |
could i start working on this issue or this issue is already closed |
hey assign these issue to me and I will resolve these |
In order to discourage duplicate PRs on an issue, assigning this issue to @piyushmishra1416 since he is the first one to come up with a good PR which is very close to the solution. Also, adding @ansh21 as one of the reviewers of the PR to take the PR forward. @piyushmishra1416 please feel free to unassign yourself from the issue if you are no longer available to work on the PR. Moving forward, we will only be reviewing PRs from the person to whom the issue is assigned. |
hii @garg3133 is this issue still open i'd love to work on it |
hello @garg3133 I would like to contribute and solve this bug, Please can you assign me this issue? |
hello @garg3133 sir is this issue still open ? As i would love to contribute to it. |
Fixed in #4216. Thanks everyone! |
Description of the bug/issue
The
isPresent
command is currently missing from the new Element API. To support this command, a new file namedisPresent.js
needs to be added insidelib/api/web-element/commands
directory, whose content should be similar to theget*
command files present in the same directory.The argument passed to
this.runQueuedCommandScoped
in these files is the name of the corresponding method to be called from thelib/transport/selenium-webdriver/method-mappings.js
file. Currently, there's no such method so it needs to be created.For the
isPresent
command, we just need to check whether the element is an instance ofWebElement
orShadowRoot
.Steps to reproduce
Go to any test file present under
examples/tests
directory (ecosia.js
andduckDuckGo.js
are good examples to work with) and try to addconst result = await browser.element('input[name=q]').isPresent()
and then run the test (see contributing guide on how to run the example tests). This would result in an error right now, while if you replaceisPresent()
withgetText()
, it should work fine.After adding the command implementation, the
.isPresent()
command should work fine.TODO
The text was updated successfully, but these errors were encountered: