我正在尝试切换到一个新窗口,当我单击债务定价模板时会显示该窗口。但我无法做到这一点,因此我无法继续进行进一步的脚本编写......问题是我不知道我应该传递什么,switchTo.window()
因为定价批准网关窗口显示并且以下是 HTML对于新窗口:
<*h1 class="pageType noSecondHeader">Pricing Approval Gateway<*/h1>
以下是代码:
LoginPage2.driver.findElement(By.linkText("TEST ORG")).click();
System.out.println("3.Select Dept pricing template button from the organization detail page.");
if(LoginPage2.driver.findElement(By.name("debt_pricing_template")).isDisplayed())
System.out.println("User should able to navigate to Dept pricing template and template display few question, user have answer these question for further navigation.");
LoginPage2.driver.findElement(By.name("debt_pricing_template")).click();
LoginPage2.driver.manage().timeouts().implicitlyWait(100, TimeUnit.SECONDS);
LoginPage2.driver.switchTo().window("bPageTitle");
请告知需要添加什么?