-1

500/javax.script.ScriptException: org.openqa.selenium.TimeoutException: Expected condition failed: waiting for presence of element located by: By.id: i0116 (tried for 8 second(s) with 500 milliseconds interval)

can anyone guide me the step by step reslove this issue

1 Answers1

0

The error means that you've tried to locate a WebElement with the id attribute having the value of i0116 and the element wasn't present in the DOM.

I can think of the following reasons:

  1. The element ID is dynamic and changes each time you load the page or being auto-generated. In this case you need to amend your locator accordingly

  2. You're using a headless browser which viewport is smaller and the element doesn't fit into the visible area. In this case you might want to increase browser window size, something like

    WDS.browser.manage().window().maximize()
    
  3. You can get the page source and inspect it to see what elements are present in the response

    WDS.log.info(WDS.browser.getPageSource())
    

    and the page HTML source code will be printed to jmeter.log file

More information on Groovy scripting in JMeter: Apache Groovy: What Is Groovy Used For?

Dmitri T
  • 159,985
  • 5
  • 83
  • 133