- Open a saved script in selenium IDE.
Command | Target | Value |
store | helloselenium blog | key1 |
echo | ${key1} | |
open | / | |
focus | //input[@id='gbqfq'] | |
type | //input[@id='gbqfq'] | ${key1} |
focus | //button[@id='gbqfb'] | |
clickAndWait | //button[@id='gbqfb'] | |
storeEval | alert('Test executed successfully!!') |
* Base URL:
http://www.google.co.in/
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA7KmANr4wXfYVK9pm9_fBJWuLslrtojdefz4_-UjGDQAP-zcHeXYhtK_E2m1YCNAsPyms5M5RSq37hHLlknWGUOuSFv1aU6gKTQec1rgMKcCY0GaAhgVt2H8noPJ1rgHqqtf5ngo-NBBF/s1600/1.jpg)
- Select line where need to add a new comment and open edit menu.
- Select “Insert New Comment” from menu options.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgljqxNTPV6MF8CY6MjWMAARpt5EOO9U3eSIqLvXzFv9ipe8tDpjJ7knnp7D6vt4I4y8K822DBHdZV4fI0WVXQq83spi5fCNBNzJsoBfSlIINfJeZY2V42IxaXBcpE0T54oY4d_CTMuQENL/s1600/2.jpg)
- Now write a new comment in inserted line.
- Run the below script in selenium IDE:
Command | Target | Value |
storing a search key as variable | ||
store | helloselenium blog | key1 |
echo | ${key1} | |
test script started from here | ||
open | / | |
focus | //input[@id='gbqfq'] | |
type | //input[@id='gbqfq'] | ${key1} |
focus | //button[@id='gbqfb'] | |
clickAndWait | //button[@id='gbqfb'] | |
test script ended from here | ||
storeEval | alert('Test executed successfully!!') |
* Base URL:
http://www.google.co.in/
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXatemxV9Sz485CZaBTF8TVcpdNrBSwhSqfUtlHrJzyFEtd9YcxueSfvPDNNec2DjpkJsXRKjvhvrfK9i9SS62b8NyThpzHImpp0a3Vr_p5AUHsUEb9TaqYzbGxfPDhrOJTr20Nxu_J-QU/s1600/3.jpg)
In the above script we have added some comment to describe the script.
2 Comments
Thanks for the useful post
ReplyDeleteThanks for this post. Very Helpful
ReplyDeleteWhat would you like to add in my list? I look forward to reading your comments below.