Selenium – My Learning’s – Part THREE

Hello Readers,

This time I was just thinking of learning commands by not recording them, but typing manually into Selenium IDE window. I thought this course might help me to learn additional about commands.

Started typing all the commands which I am familiar with (As said in previous two posts)

Wanted to open Google.co.in – Added the link to “Base URL” as shown

 

What if I run, will it open Google.co.in? No, because I have not mentioned a command to open it. I just mentioned what to open.

After searching for some examples, I found this http://www.qaplanet.in/Selenium-Handbook-by-qaplanet.in.pdf useful. Thanks for the author for helping with testing exercises.

Note: I changed the steps into my own process.

First Exercise:

• Open (www.google.com)

• Type “Sudhamshu Ailineni” in the Google Search Input Box

• Click Search Button

• Verify the Text Present as “Sudhamshu Ailineni”

• Assert the Title as “Sudhamshu Ailineni – India|Linkendin”

 

First_Exercise
open /
type id=lst-ib Sudhamshu Ailineni
click name=btnK
verifyTextPresent Search
pause 1000
verifyTextPresent Sudhamshu Ailineni
assertTitle Sudhamshu Ailineni – Google Search

 

Why I did add a “pause” command at line 5, because “Sudhamshu Ailineni” text takes some time to load and if I have not been added that command, it will through an error message as “False”.

 

Second Exercise:

  1. Open Firefox Web Browser
  2. In the address bar, Type http://www.yahoo.com
  3. In the search input button, Type “Sudhamshu Ailineni”
  4. Click on the “Web Search” submit button
  5. Wait for Search Results to come on “http:/search.yahoo.com”
  6. Verify “Sudhamshu Ailineni” text is present anywhere in the search results: (Select and highlight anywhere in the search results page, “energy efficient” text is present.)

 

Second_Exercise
open /?p=us
pause 1000
type id=p_13838465-p Sudhamshu Ailineni
clickAndWait id=search-submit
verifyTextPresent Sudhamshu Ailineni | LinkedIn

 

You can observe that, it is opening that “/?p=us”, what does it mean? What happens if I change this to “/”. Let me change and see the results. It is not finding the target of the application and getting timed out after 30000 ms J

 

Third Exercise: 

  1. File à New Test Case (Make Selenium IDE in Record Mode)
  2. Open http://www.ge.com
  3. Go all the way down, click on the “Contact Information” link
  4. Click on “Feedback & Inquiries” link
  5. Consumer/Other (Leave the default option)
  6. Select a Subject (Other)
  7. Select a Country (India)
  8. Email (type test@test.com)
  9. Comments or Questions (type Test Comments)
  10. Submit (click once)
  11. In the result page, highlight “Thank you for taking the time to contact GE”
  12. Right Click and Select waitForTextPresent “Thank you for taking the time to contact GE”
  13. Highlight “Feel free to continue browsing.”
  14. Right Click and Select VerifyTextPresent “Feel free to continue browsing.”
  15. Right Click on “GE.com Home Page” link and Select verifyElementPresent “link=GE.com Home Page”

 

Third_Exercise
open /
clickAndWait link=Contact Information
pause 500
clickAndWait link=Feedback & Inquiries
waitForTextPresent Subject (Mandatory)
select id=contact_subject label=Other
select id=contact_country label=India
type id=contact_email test@test.com
type id=contact_comments Test Comments
clickAndWait id=submit_button
waitForTextPresent Thank you for taking the time to contact GE
verifyTextPresent Feel free to continue browsing.
verifyElementPresent link=GE.com Home Page

 

I am in hunt of finding more exercises; if you have something then please share with me, let us automate them using Selenium IDE.

P.S: I will write more on Locating Elements, Useful Selenium Add- Ons and much more after my exploration and learning

 

Happy Learning – Happy Testing

Thanks,
Sudhamshu

Advertisements

3 thoughts on “Selenium – My Learning’s – Part THREE

  1. I blog often and I seriously appreciate your content.
    This article has truly peaked my interest.
    I will book mark your site and keep checking for new information about once per
    week. I opted in for your RSS feed too.

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