Further to the previous question Unable to execute the test plan using chrome driver headless mode in jmeter using selenium, I have added the explicit wait of 150 seconds and run the test plan with the headless mode of Chrome driver using Jmeter GUI and It again gives me an error saying:

2020-04-30 13:16:33,916 ERROR c.g.j.p.w.s.WebDriverSampler: Expected condition failed: waiting for element to be clickable: By.id: userDropdown (tried for 150 second(s) with 500 milliseconds interval) Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z' System info: host: 'LAPTOP-HOHMIE0I', ip: '**.*.*.**', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 81.0.4044.129, chrome: {chromedriverVersion: 80.0.3987.106 (f68069574609..., userDataDir: C:\Users\SOLITE~1\AppData\L...}, goog:chromeOptions: {debuggerAddress: localhost:57331}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(autodetect), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}

For More Information see the below Image:

enter image description here

I have tried a lot to resolve this in many different ways but it didn't work. Can anyone please help me how can I resolve this?

1 Answer 1


It might be the case the element you want to interact with isn't in the current Viewport as headless Chrome browser window isn't maximized hence all the elements don't fit.

You can try setting larger WebDriver.Window size before waiting for the element to be clickable like:

WDS.browser.manage().window().setSize(new org.openqa.selenium.Dimension(1920, 1080))

This will set browser window to the Full HD resolution

More information: The WebDriver Sampler: Your Top 10 Questions Answered

  • Thanks a lot !! You are just amazing. From the past 5 days, I have tried to fix this, unfortunately, I didn't get the exact answer from anywhere. Then you come to happen and I get the exact solution. Thanks for being there !! :)
    – Rajan
    Apr 30, 2020 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.