0
我需要點擊IE瀏覽器按鈕,我已經使用這兩種情況下,但沒有工作對我來說 需要點擊按鈕
driver.findElement(By.xpath("//button[text()='Existing Customer']")).click();
或
driver.findElement(By.xpath("//*[contains(text(), 'Existing Customer')]")).click();
或
WebElement obj = driver.findElement(By.xpath("//button[text()='Existing Customer']")).click();
Actions act = new Actions(driver);
act.moveToElement(obj).build().perform();
在我看來,這是一個下拉菜單。可以提供以下信息:1.提供更多的HTML DOM。 2.你能確認它是否是模態下拉菜單嗎? 3.提供下拉菜單的屏幕截圖。 – DebanjanB