我有一个utils定义了ExplictWait的类,并且想要调用该成员并将其应用于扩展到上述utils类的功能要素类。实用程序类ExplicitWait方法:public void explicitWait(){ WebDriverWait waitExplicit = new WebDriverWait(driver, 20); }功能要素类方法: public void userLogout(){ SatusPageElements forLogOut = new SatusPageElements(); if(driver != null) { driver.findElement(forLogOut.profileName).click(); driver.findElement(forLogOut.logoutLink).click(); } else{ System.out.println("No Driver");SatusPageElements是一个类,其中在SatusPageElements中定义了状态页面对象,并单击了profileName和logoutLink。在这种情况下,当单击profileName链接时,将显示logoutLink以单击。登出链接需要等待一些时间。因此,我必须为其应用等待时间,但团队仅决定应用定义的Explicit Wait方法。有什么想法吗?
添加回答
举报
0/150
提交
取消