How can SilkTest toggle between two browser windows with the same title caption?
This can cause problems as SilkTest can treat both browsers as the same Window, causing the testcases to fail. Start by having the two browsers open and loaded with the webpages of the same name. To ensure the success of your tests, do not have other browsers opened which are unrelated to the tests. Then use the code below to toggle between the windows:
Browser.SetActive( ) //This sets the first page active Browser.Minimize( ) //this minimizes the active page Browser.SetActive( ) //This sets the second page active Browser.Minimize( ) //this minimizes the second active page Browser.SetActive( ) //this sets the first page active again
In this example the two pages have the same title, normally this would cause a problem in testcase playback, especially if you use the testcase or action recorder.
To work around it and toggle between pages of the same title simply minimise the browser currently open and set the browser to active again, it will toggle between the two open pages by minimizing one and setting active the next.