Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 99024

Selenium webdriver throwing timeout exception

$
0
0

I am new to Selenium.

My issue is that I'm trying to click an element but Selenium is throwing a timeout exception, even if I increase the timeout value.

Do I need to use xpath instead of id?

The HTML Code is:

enter image description hereMy code looks like this

 void searchquotation() throws TimeoutException {    try {          WebDriverWait wait = new WebDriverWait(driver, 15);          WebElement element = wait.until(ExpectedConditions.presenceOfElementLocated(By.name("SearchButton")));          element.click();       }    catch(TimeoutException e) {         System.out.println("Timeout occured");       }

Am I doing anything wrong?


Viewing all articles
Browse latest Browse all 99024

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>