For test cases using robot framework and Selenium2Library, we normally start with opening the browser and then doing actions on that browser.
But for the purpose of quickly testing steps within my test case (for testing my test itself) it would be nice if I could just run for example 'click button' on an already existing browser session.
This saves a lot of time if my AUT has to be in a certain screen and state to perform a certain action. That way I can automate and test a certain step in isolation without needing the script to perform all the steps required before that first.
Is there any selenium2libary keyword or some other way I might do this?
Thank you!
You do not need
robotframe
for same. You can checkWindowHandles
. If thewindowHandle
having value more then 0 then there is more window open then default one.The code looks something like below. You can make changes in below if the window is more than 1. Try the following code:
Hope it will help you :)