【发布时间】:2020-10-06 05:02:39
【问题描述】:
我正在使用 JMeter+Groovy 并希望等待元素在 UI 中显示,但它失败并出现以下错误:
2020-10-06 16:02:03,775 错误 c.g.j.p.w.s.WebDriverSampler: javax.script.ScriptException: groovy.lang.MissingPropertyException: 没有这样的属性:对于类:Script42
我的代码是:
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait
def wait = new WebDriverWait(WDS.browser,5000);
WDS.sampleResult.sampleStart();
WDS.browser.get('https://google.com/');
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(".//input[@name='q']")));
WDS.sampleResult.sampleEnd()
【问题讨论】:
标签: selenium-webdriver groovy jmeter jmeter-plugins