我希望驱动程序等到元素可见或存在,但它根本不起作用!以下代码
it('shows events in "Event overview"', function(){
driver.findElement(By.css('#bs-example-navbar-collapse-1 > ul > li:nth-child(2) > a')).click();
driver.wait(function () {
return driver.isElementPresent(By.css('body > div.container > div > div.events-container.ng-scope > div:nth-child(1) > div.row.row-event.detailed-view > div.col-xs-9.col-sm-9.col-md-10'));
}, 3000);
});
Run Code Online (Sandbox Code Playgroud)
给我以下错误
driver.isElementPresent is not a function
Run Code Online (Sandbox Code Playgroud)
为什么?我从这里复制了答案:Selenium WebDriver等到元素显示.其他答案也不起作用.我应该展示更多我的代码吗?我在客户端项目上工作,我不想发布客户端的名称.