I use Apache JMeter 5.4.1 and chromedriver 107.0.5304.62 for web page access test.
If I execute the test scenario without headless mode, and it succeeds.
But when the headless mode is enabled, the test failed and following error occurs.
2022-11-16 09:21:45,271 ERROR c.g.j.p.w.s.WebDriverSampler: Expected condition failed: waiting for element to be clickable: By.xpath: //*[@id="sub"]/ul/li[5]/a (tried for 120 second(s) with 500 milliseconds interval) Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z' System info: host: 'EC2AMAZ-HQV0HF4', ip: '192.100.1.13', os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_351' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 107.0.5304.107, chrome: {chromedriverVersion: 107.0.5304.62 (1eec40d3a576..., userDataDir: C:\Users\DAISKA~1\AppData\L...}, goog:chromeOptions: {debuggerAddress: localhost:50048}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(direct), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true} Session ID: dbe1607372464587370fb424398e501b
I changed the scenario(increased the wait time), but nothing changed. The scenario is following.
var pkg = JavaImporter(org.openqa.selenium, org.openqa.selenium.support.ui) var wait = new pkg.WebDriverWait(WDS.browser, 120) wait.until(pkg.ExpectedConditions.elementToBeClickable(pkg.By.xpath('//[@id="sub"]/ul/li[5]/a'))) var activity = WDS.browser.findElement(pkg.By.xpath('//[@id="sub"]/ul/li[5]/a')) activity.click()