링크를 열었습니다. 해당 페이지의 로그인 링크를 클릭하고 있습니다. 새 탭에서 로그인 버튼을 클릭하면 해당 탭이 자동으로 열립니다. 해당 탭에서 양식을 채워야합니다. 내가이 탭에서 아무것도 할 수 초점을 전환 할 수 있지만 나는 이것에 의해두 번째 탭에 초점을 맞추고 Selenium webdriver를 사용하여 작업하는 방법
Actions act = new Actions(Initialsetupfirefox.driver);
new Actions(Initialsetupfirefox.driver) .keyDown(Keys.CONTROL).click(Initialsetupfirefox.driver.findElement(By.xpath("//a[contains(text(),'LOGIN')]")))
.keyUp(Keys.CONTROL)
.perform();
Thread.sleep(3000);
new Actions(Initialsetupfirefox.driver).sendKeys(Initialsetupfirefox.driver.findElement(By.tagName("html")), Keys.CONTROL).sendKeys(Initialsetupfirefox.driver.findElement(By.tagName("html")),Keys.NUMPAD2).build().perform();
: 그 동안 나는 다음과 같은 코드를 시도했다. 이 같이 할 수
, [전환 창에 대한 링크 (http://stackoverflow.com/에 따라 질문/9588827/how-to-the-new-browser-window-which-after-click-on-the-button) –
그러나 전환 탭을 수행하고 있습니다 – liki