Closed sunil31925 closed 9 years ago
Hi Sunil,
Even I found the problem in Switch window so I have added an extra Keyword in Browser library which will support such scenario. Even switch to Frame was not Fluent .
You can implement using multiple ways , below is one example where you can switch to another window by Page Title ( You can apply any other content Logic):
@RobotKeyword
@ArgumentNames({"windowsTitle"})
public void changeFocusToWindow(String windowsTitle) throws InterruptedException {
WebDriver driver = getCurrentWebDriver();
Set<String> windowsHandle = getWindowsHandler();
logging.info("Count of open Windows by WebDriver Instance "+windowsHandle.size());
for (String sHandler : windowsHandle) {
if (driver.switchTo().window(sHandler).getTitle().contains(windowsTitle)) {
//windowHandleDriver=driver.switchTo().window(sHandler);
logging.info("After Window context Switch the current working Window Page title is " + driver.getTitle());
break;
}
}
}
Let me know if any issue.
@sunil31925
You can copy the code and try. The above code works for me as the driver instance is single and we are switching between the windows.
Try and let know .
Ok, now it's work for me. Thanks you so much
Sent from my iPhone
On Jul 26, 2015, at 6:35 PM, Asit notifications@github.com wrote:
@sunil31925
You can copy the code and try. The above code works for me as the driver instance is single and we are switching between the windows.
Try and let know .
— Reply to this email directly or view it on GitHub.
No worries Sunil.
Which company you work for and are you liking the Robot Framework ?
Trail demo going on let see how's thing going
Sent from my iPhone
On Jul 28, 2015, at 6:52 PM, Asit notifications@github.com wrote:
No worries Sunil.
Which company you work for and are you liking the Robot Framework ?
— Reply to this email directly or view it on GitHub.
Its simple and useful if manual testing team use the Robot Default or user generated keywords to convert test cases to Robot Test cases steps. But if that's not the case and for a complex project and application under test is complex where you have AJAX and FRAMES, multiple windows then you have to think.
I started using from few months but I like to code in Java rather call the keywords . Good if you implement EventfiringwebDriver top of the default WebDriver and work on that. This way beforeElement click you can add a common selenium EXPECTEDCONDTION.
Good luck
Cheers Asit
I try all three way called select window by url, name and title but getting same error. my xpath is correct i also verify that. here is my sample code ################### Clicking below link open new window Click Link xpath=//div/a[contains(text(),'Browse')]
Create Equipment IO | FAIL | Element 'xpath=//a[text()='Planned Devices']' did not appear in 5 seconds Wait Until Page Contains Element xpath=//a[text()='Planned Devices']