我有一個utils定義了ExplictWait的類,并且想要調(diào)用該成員并將其應(yīng)用于擴展到上述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中定義了狀態(tài)頁面對象,并單擊了profileName和logoutLink。在這種情況下,當(dāng)單擊profileName鏈接時,將顯示logoutLink以單擊。登出鏈接需要等待一些時間。因此,我必須為其應(yīng)用等待時間,但團(tuán)隊僅決定應(yīng)用定義的Explicit Wait方法。有什么想法嗎?
添加回答
舉報
0/150
提交
取消