Description
While creating Web Testcase there is a need to deal with a page the opens a new browser window. Cyara doesn't follow the new window by the default.
Cyara documentation doesn't provide any recommendations how to create test cases for such pages.
Solution
There are 2 possible ways to solve the issue:
- Force page not to open a new window
- Instruct Cyara to follow to the new window
1. Force the page not to open a new window
- Add a step that ensures that page is loaded
- Add an additional step before the page opens new window:
Step type: JavaScript
Step contents: JavaScript("document.querySelecor('#form-personalform').target='_self' ")
- Continue to the step that opens new window
Note: The script above has to be modified depending on the web page code.
2. Follow to the new window
- Add a step that ensures that page is loaded
- Continue to the step that opens new window
- Instruct Cyara to go to the new window
Step type: Function
Step contents: SetActiveWindow(1)
Note: Screenshots may not work properly after switching to the new window
Comments
0 comments
Please sign in to leave a comment.