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

GetDriver() is seeing displayed element but Ensure is not #2498

Closed
TesterHas opened this issue Jun 29, 2021 · 4 comments
Closed

GetDriver() is seeing displayed element but Ensure is not #2498

TesterHas opened this issue Jun 29, 2021 · 4 comments

Comments

@TesterHas
Copy link

I am using serenity screenplay and using Ensure to assert that the element is displayed.
Works:
BrowseTheWeb.as(theActorInTheSpotlight()).getDriver().findElement(By.xpath(“”)).isDisplayed();
Did Not Work:
TheActorInTheSpotlight.attemptsTo(Ensure.that(TARGET).isDisplayed());

any reason why the Ensure way is failing?

@wakaleo
Copy link
Member

wakaleo commented Jun 29, 2021

That should work - try digging into the Ensure code to see what it is doing

@TesterHas
Copy link
Author

It is wired..i have a few Ensure statements. All of them work fine except one so the Ensure method is working. Keep getting element not present on the DOM for one of the elements but work when i use getDriver();

@wakaleo
Copy link
Member

wakaleo commented Jul 4, 2021

Can you provide a small sample project that reproduces the issue?

@wakaleo
Copy link
Member

wakaleo commented Feb 12, 2022

Closing for lack of activity.

@wakaleo wakaleo closed this as completed Feb 12, 2022
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