【发布时间】:2021-02-04 15:43:43
【问题描述】:
我不确定为什么在我的脚本上保持失败并显示响应代码 500。请是我的示例代码和错误消息。请多多指教。非常感谢。
错误信息:
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)
示例代码:
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();
【问题讨论】:
标签: selenium-webdriver groovy jmeter