您将必须使用JavascriptExecutor类:
WebDriver driver; // Assigned elsewhereJavascriptExecutor js = (JavascriptExecutor) driver;js.executescript("document.getElementById('//id of element').setAttribute('attr', '10')");
欢迎分享,转载请注明来源:内存溢出
您将必须使用JavascriptExecutor类:
WebDriver driver; // Assigned elsewhereJavascriptExecutor js = (JavascriptExecutor) driver;js.executescript("document.getElementById('//id of element').setAttribute('attr', '10')");
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)