使用以下代码:-
if(displayFlag==true && enableFlag==true) { try{ Thread.sleep(5000); } catch(Exception ex) { System.out.println(ex.getMessage()); } WebElement element=driver.findElement(By.xpath("//span[@]")); JavascriptExecutor executor = (JavascriptExecutor) driver; executor.executescript("arguments[0].click();", element); System.out.println("Tried to click One Way"); }
享受..如果仍然遇到任何问题,请与我联系:)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)