question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Selenium 4] ExpectedConditions are not Kotlin-compatible

See original GitHub issue

🐛 Bug Report

With Selenium 4 actually, it is not possible to use the ExpectedConditions as in Selenium 3. I already discussed that with @shs96c in Slack.

Simon: “You should be able to use ExpectedConditions. They’re just a plain Function<X, WebDriver> under the covers”

To Reproduce

Update your maven dependency to Selenium 4.0.0-alpha-7 and try to build (while using ExpectedConditions like

WebDriverWait(webdriver, 10).until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(".Confirmation__heading"))

Environment

OS: Windows 10 Browser: independent Language Bindings version: Java 4.0.0-alpha-7

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
boris779commented, Mar 5, 2021

Problem found. Afer adding this dependecy it works

<dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib-jdk8</artifactId> <version>1.4.31</version> </dependency>

0reactions
boris779commented, Mar 4, 2021

It seems that it has to do something with the dependencies, I’m still working on this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

After updating selenium 4 ExpectedConditions condition not ...
After updating selenium 4 ExpectedConditions condition not working. how i should take care of mention code.
Read more >
Understanding ExpectedConditions in Selenium - BrowserStack
Understand how to use 7 different types of ExpectedConditions in Selenium with code examples to check if all elements present are visible.
Read more >
What Is ExpectedConditions In Selenium (With Examples)
In Implicit Wait, the DOM is polled by the Selenium WebDriver for a specified amount of time when a particular WebElement is not...
Read more >
ExpectedConditions - Selenium
An expectation for checking that an element is either invisible or not present on the DOM. static ExpectedCondition<java.lang.
Read more >
ExpectedConditions in Selenium - DZone
4 - The WebDriver does an Explicit Wait for 5 seconds until the requisite element is clickable (i.e. it can be clicked). If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found