Selenium – My Learning’s – Part TWO

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
3. Submit

Result:
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.

Command Target Value
type id=user_name sudhamshu2016

 

 

“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”

Command Target Value
type id=user_email ratnadeepu568912@gmail.com

 

 

 

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:

  1. I want to check the Title of the Webpage before my test runs, so I used “assertTitle”.
  2. 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

Regards,
Sudhamshu

Advertisements

13 thoughts on “Selenium – My Learning’s – Part TWO

  1. I am using selenium ide, i have been successful handling pop ups in other components of my application except one.
    How do i identify a pop up window opened by server?
    When i click on submit button a php file validates the form and then opens pop up initiated by the server. Selenium is unable to identify the pop up, returns window doesn not exist. i have tried using different commands but unable to tackle this pop up.

  2. My spouse and I absolutely love your blog and find most of your post’s to be precisely what I’m looking for.
    Does one offer guest writers to write content to suit
    your needs? I wouldn’t mind producing a post or elaborating on a number of the subjects you write about here. Again, awesome website!

  3. Thanks a ton, Darmowe. Between I did not understand this *Does one offer guest writers to write content to suit your needs?*
    Can you please elaborate more on this?

    Thanks,
    Sudhamshu

  4. Thank you for some other fantastic post. The place else could anyone get that type of info in such
    an ideal approach of writing? I have a presentation next week,
    and I’m on the search for such information.

  5. Hi, I do believe your site might be having internet browser compatibility issues.
    When I take a look at your blog in Safari, it looks
    fine but when opening in I.E., it’s got some overlapping issues. I just wanted to give you a quick heads up! Apart from that, excellent website!

  6. hey there and thank you for your information – I’ve certainly picked up something new from right here. I did however expertise a few technical issues using this site, as I experienced to reload the website a lot of times previous to I could get it to load correctly. I had been wondering if your web hosting is OK? Not that I am complaining, but slow loading instances times will often affect your placement in google and could damage your high-quality score if advertising and marketing with Adwords. Anyway I am adding this RSS to my email and can look out for a lot more of your respective exciting content. Make sure you update this again very soon.

  7. Thanks for your splendid observations. Hope, my previous blog template is loading a lot of images and background themes, and hence it is taking a lot of time in loading the content. Now, I changed the template and themes, and hope it fastens the performance.

    Glad that you added my blog as RSS, and I will continue to write many posts to get back to you. Thanks for spending your awesome time in reading my blog.

    Thanks,
    Sudhamshu

  8. Thanks for your splendid observations. Hope, my previous blog template is loading a lot of images and background themes, and hence it is taking a lot of time in loading the content. Now, I changed the template and themes, and hope it suits for all the browsers.

    Not getting time to test my personal blog in all the browsers, before writing this comment :)I will continue to write many posts to get back to you. Thanks for spending your awesome time in reading my blog.

    Thanks,
    Sudhamshu

  9. Thanks a lot for spending your awesome time in reading my posts and blog. Your encouragement drives me to write more better posts to help the community. I will carry on my work, and try to reach you more often with posts on my blog.

    Thanks,
    Sudhamshu

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s