I have a scenario in which I have three browsers instances are active i.e i have main browser then i have clicked on a button to open a popup(lets name it as "popup1") and created a record in the popup then i clicked on a button to open another popup(lets name it as "popup2"), Now i have three browser instances one is main browser and two popups(popup1 and popup2).
Now i have connected to popup2 then created a record and closed popup2 here my active window will be popup1, this is the scenario i am trying to execute. While replaying on IE it is able to connect to popup2 and able to write in the text boxes of popup then record was created but while closing the popup2 it is closing the popup1. To rectify this problem i have customized the closing step like below:
Manger.Browsers[2].Close();
Now popup2 is closed and popup1 became active then i am able to perform some actions in popup1.
So this test case is working fine in IE But my problem is with chrome and FF. While replaying in FF or Chrome, popup2 connection step executed successfully but when it is trying to type some thing in popup2 text box then focus is going popup1, it is searching text box in popup1 so the test case was failing. So i have added a script step before the step which typing some text in to the text box. Code for the script step is:
Browser br= Manager.Browsers[2];
br.Window.SetFocus();
Can you please guide me this problem so that i can make this test case pass?
Now i have connected to popup2 then created a record and closed popup2 here my active window will be popup1, this is the scenario i am trying to execute. While replaying on IE it is able to connect to popup2 and able to write in the text boxes of popup then record was created but while closing the popup2 it is closing the popup1. To rectify this problem i have customized the closing step like below:
Manger.Browsers[2].Close();
Now popup2 is closed and popup1 became active then i am able to perform some actions in popup1.
So this test case is working fine in IE But my problem is with chrome and FF. While replaying in FF or Chrome, popup2 connection step executed successfully but when it is trying to type some thing in popup2 text box then focus is going popup1, it is searching text box in popup1 so the test case was failing. So i have added a script step before the step which typing some text in to the text box. Code for the script step is:
Browser br= Manager.Browsers[2];
br.Window.SetFocus();
Can you please guide me this problem so that i can make this test case pass?