driver.get("http://www.google.com");
String selectLinkOpeninNewTab = Keys.chord(Keys.CONTROL,"t");
driver.findElement(By.tagName("body")).sendKeys(selectLinkOpeninNewTab);
driver.get("http://www.qaautomated.com");
我使用Key.chord嘗試,但它沒有打開一個新標籤試圖打開的Chrome瀏覽器一個新的標籤,但它沒有打開一個新標籤
如果你_don't_使用' Key.chord'? (如該網站上所示) –
是的,我嘗試不使用Key.chord,但它不工作。我只使用鉻驅動程序 –
它應該只與Keys.CONTROL +「t」 –