我知道可以找到類似的問題,但沒有人提供了備用解決方案。請耐心等待。上下文的替代方法在Chrome瀏覽器中:Selenium-WebDriver- Java
經過一番研究,我意識到這是不可能在Chrome browser.For前自動contextClick:
如果我需要下面的代碼和瀏覽器執行必須是CHROME-
driver.get("https://www.google.com"); Actions ac= new Actions(driver); ac.moveToElement(driver.findElement(By.id("hplogo"))).contextClick().sendKeys(Keys.ARROW_DOWN).build().perform();
會如果我可以選擇使用contextClick選項,將會很有幫助。 謝謝
你究竟在做什麼?什麼動作? –