I have a web application I am automating with watir. The application has a browsing page which shows thumbnails for a set of templates. Each thumbnail is开发者_开发问答 a link to the template. I need to open each template in a new tab or window and take a screen shot or print a pdf of the template to verify that it opens correctly and looks correct. Then close that tab or window and return to the template browser to open the next template. I need to do this on firefox/safari chrome and IE mac and windows.
Why not open it in the same tab, take the sreenshot, then go back?
I haven't used Watir, only Selenium, but it looks like Watir has a back
method as well. If not, you can probably store the URL of the page with the thumbnails and then open it directly by URL.
You can read the url of the link, store it in an variable, open a new browser window and then with ie.goto(url)
you can open the link in a new browser.
精彩评论