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

(feat): added isPresent command to Element API #4098

Closed
wants to merge 6 commits into from

Conversation

AritraLeo
Copy link
Contributor

I've added the isPresent() command as per the issue .
Although the code encountered a error in unit testing at - .navigateTo('https://duckduckgo.com')
line : 7 of duckDuckGo.js file.

I am mainly raising the PR to get my code reviewed to get a better understanding if I am moving in the right direction or not !

@CLAassistant
Copy link

CLAassistant commented Mar 6, 2024

CLA assistant check
All committers have signed the CLA.

@AritraLeo AritraLeo changed the title isPresent command added initial commit (feat): added isPresent command to Element API Mar 6, 2024
@garg3133
Copy link
Member

Closing this PR because the current solution is incorrect (it will always return true because the webElementOrId argument to isElementPresent will always be a WebElementPromise, which in turn is an instance of WebElement. So, element instanceof WebElement will always return true even if the element actually does not exist.

Also, as it turns out, the solution to this is not going to be simple and will take a lot more efforts to implement, so we'll be doing it ourselves.

@garg3133 garg3133 closed this May 22, 2024
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

Successfully merging this pull request may close these issues.

None yet

3 participants