This time I will show you my learning’s of SELENESE – Selenium Commands
I recorded the script for creating a WordPress blog.
Steps are as follows:
1. Open WordPress website (https://en.wordpress.com/signup/)
2. Fill in all the required fields
Should send an email with the activation link.
So, here is the script displayed after recording the above steps:
Before playing the above script, I cross verified and observed the following issues:
* Not recorded the Step for “Username”
* Not recorded the Step for “E-mail Address”
Because, “Username” is the value which it has taken automatically from the Blog name while I am recording. Also the “E-mail Address”, it is not recording because when we type some text it searches in their Database and throws an error message to enter the valid email address, this is stopping Selenium to record the step. (As shown in the screenshot)
How I made my script work?
After exploring I learned about “type” and “typeAndWait” command. They are something similar like “click” and “clickAndWait”
From the initial script, I understood that each field in the page has an id and that should be inserted to make my script work.
“Username”– I added the command as above
Okay, you might get confused of how and from where to get id. Right click you mouse on placing the cursor on the field you are searching for. You will get some options as like shown below:
Did the same for “E-mail Address”
And my script looked like this after playing.
Still exploring a lots of SELENSE commands, if you start learning Selenium you might know more about SELENSE, because your context may vary from mine.
While I was recording the script for Gmail Registration, I found some issues with the Hidden drop-down values and CAPTCHA. After exploring a lot I found that there is no way to record CAPTCHA with Selenium IDE. Just to add a “pause” command and type in manually.
But I still did not have a solution of how to record the script for Hidden drop-down values (Still exploring).
Some other commands which I tried to insert after exploring:
- I want to check the Title of the Webpage before my test runs, so I used “assertTitle”.
- Again I want to check the Title of the Webpage before my test runs, so I used “verifyTitle”
How they both are different?
I observed that when I add “verifyTitle” my script is running without failing at that step and showing me the results at end and “assertTitle” is halting the script where it went wrong
When you think in different ways of automating, you might be using more commands. Write the steps before you automate, it helps you automate better.
P.S: Dear reader if you have a solution to record the Hidden drop-down values, please share it with us.
Happy Exploring – Happy Testing