Newbie needs detailed help on an issue involving the use of a popup (Java) window. Simply I need to fire / activate the "OK" portion of the window.
I'm using Pamie to generate automated testing and so far everyting has gone well until I ran across a pop up window.
My test script in part is as follows:
-
#Navigate to Remove account
-
ie.navigate(url + '/profile/RemoveAccount.aspx?Inst=Institution%20Auto%20Test&Company=Company%20Auto%20Test&Site=Site%20Auto%20Test')
-
time.sleep(2)
-
#Select "Company 2" for deletion
-
ie.buttonClick('GID_852963742')
-
time.sleep(2)
-
#Delete Profile
-
ie.buttonClick('_ctl0_ContentPlaceHolder1_RemoveAccount1_btnDelete')
-
time.sleep(2)
At this point the pop up window is displayed. In the view source window of I.E. the following is found:
<input type="submit" name="_ctl0:ContentPlaceHolder1:RemoveAccount1:btn Delete" value="Delete" onclick="return confirm('Are you sure you want to delete the selected accounts?');" language="javascript" id="_ctl0_ContentPlaceHolder1_RemoveAccount1_btnDe lete" />
The pop up box displays an "OK" and a "Cancel" button. I wish to "fire" the "OK".
Can some one please provide details / hand hold how to handle this? I've read about thirty post on various boards, many taking far different approaches. Some examples given have 30-40 lines of code just to activate the "OK" button and I'm not schooled enough in Python / PAMIE to understand what the sample code is doing.
The help is appreciated.