[英]JMeter Groovy - WebDriver Sampler script failed with Response Code 500
I am not sure why keep failed with Response Code 500 on my script.我不确定为什么在我的脚本上保持失败,响应代码为 500。 Please is my sample code and error messages.
请是我的示例代码和错误消息。 Please kindly advise.
请多多指教。 Many thanks.
非常感谢。
Error Messages:错误信息:
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect
1612415604534,36638,jp@gc - WebDriver Sampler,500,"javax.script.ScriptException: org.openqa.selenium.ElementNotInteractableException: element not interactable
(Session info: chrome=88.0.4324.146)
Sample Code:示例代码:
import org.openqa.selenium.*;
import org.openqa.selenium.support.ui.*;
WDS.sampleResult.sampleStart();
WDS.browser.get("https://uat-testing.com/");
sleep(10000);
WDS.browser.findElement(org.openqa.selenium.By.xpath("//input[@type='text']")).sendKeys("xxxx@testing.com");
WDS.browser.findElement(org.openqa.selenium.By.xpath("//input[@type='password']")).clear();
WDS.browser.findElement(org.openqa.selenium.By.xpath("//input[@type='password']")).sendKeys("xxx@xxxx");
WDS.browser.findElement(org.openqa.selenium.By.xpath("//button/span")).click();
sleep(20000);
WDS.browser.findElement(org.openqa.selenium.By.xpath("//div[10]/li/span")).click();
WDS.browser.findElement(org.openqa.selenium.By.xpath("//div[16]/li/span")).click();
WDS.browser.findElement(org.openqa.selenium.By.xpath("//div[3]/li/span")).click();
WDS.browser.findElement(org.openqa.selenium.By.xpath("//div[5]/div/div/div")).click();
WDS.browser.findElement(org.openqa.selenium.By.xpath("//ul[contains(@id,'dropdown-menu-')]/li")).click();
WDS.browser.findElement(org.openqa.selenium.By.xpath("(//button[contains(@type,'button')])")).click();
sleep(30000);
WDS.sampleResult.sampleEnd();
This ElementNotInteractableException means that the element you're trying to work with cannot be used by WebDriver此ElementNotInteractableException意味着您尝试使用的元素不能被 WebDriver 使用
Thrown to indicate that although an element is present on the DOM, it is not in a state that can be interacted with.
抛出表示虽然元素存在于 DOM 中,但它不在可与之交互的 state 中。
Most probably it's "covered" by other DOM element so the options are in:很可能它被其他 DOM 元素“覆盖”,因此选项位于:
More information on WebDriver Sampler: The WebDriver Sampler: Your Top 10 Questions Answered有关 WebDriver Sampler 的更多信息: WebDriver Sampler:您回答的 10 大问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.