Popups and private windows: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
Command: selectWindow | Command: selectWindow | ||
Target: name=WindowName | Target: name=WindowName | ||
Command: open | |||
Target: /page.html | |||
</pre> | </pre> | ||
NB if you have multiple tests running after each other in a suite, each starting with an openWindow you need to ensure that Firefox allows popups for the site by adding it to the blocked popup exceptions in Edit -> Preferences -> Content -> Add popup exception | |||
= private windows = | = private windows = |
Latest revision as of 09:33, 4 April 2016
new windows
Command: openWindow Target: http://www.somewhere.com/page.html Value: WindowName Command: selectWindow Target: name=WindowName Command: open Target: /page.html
NB if you have multiple tests running after each other in a suite, each starting with an openWindow you need to ensure that Firefox allows popups for the site by adding it to the blocked popup exceptions in Edit -> Preferences -> Content -> Add popup exception
private windows
First open the popup:
Command: runScript Target: javascript{link='http://kenjelocatie.test.local/login-default.html';window.open(link,"testwindow","private=yes, menubar=yes, location=yes, resizable=yes, scrollbars=yes, titlebar=yes, status=yes")}
Then pause a bit Then:
Command: openWindow Target: Value: testwindow
Switch to the window
Command: selectWindow Target: name=testwindow