Reputation: 31
Just wonder if we could do something like below when running a selenium scenario, which needs user's interaction to continue. Like wait for him to upload some images..
Till the step, the selenium popup a dialog saying: please complete something, then click the OK button to continue.
When user finishing the operation on the webpage, then click "OK", then the scenario's transaction is moving forward. Otherwise, stop on that step.
For the first bullet, I was thinking of below command:
Command:
waitForConfirmation
Target:
javascript{confirm("Please upload the images, then click OK to continue")}
Thanks in advance!
Upvotes: 3
Views: 13870
Reputation: 4328
In selenium ide use storeeval command, different type of boxes
COMMAND | TARGET | VALUE
----------------------------------------------------------------------------
storeeval | alert("This is alert box") |
storeeval | prompt("This is prompt box. Please enter the value") | text
storeeval | confirm("this is cofirm box") |
Type | locator of text box | ${text}
Upvotes: 5
Reputation: 1006
1.) we can create a message box and can assign the value given in the message box to a text box.
Command:StoreEval
Target:prompt{("Enter the Message")}
Value:Text
here a pop up message box will pop up and you can enter some text into it and it will store in the variable "Text" the value in the Text can be assigned to a text box or other
Command:type
Target:id=id of the text box
value:${Text}
2.)same as above we can create an alert box
Command:StoreEval
Target:alert{("Enter the Message")}
Try these things
Thank you.
Upvotes: 3