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.
• 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”
|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”.
- Open Firefox Web Browser
- In the address bar, Type http://www.yahoo.com
- In the search input button, Type “Sudhamshu Ailineni”
- Click on the “Web Search” submit button
- Wait for Search Results to come on “http:/search.yahoo.com”
- 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.)
|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
- File à New Test Case (Make Selenium IDE in Record Mode)
- Open http://www.ge.com
- Go all the way down, click on the “Contact Information” link
- Click on “Feedback & Inquiries” link
- Consumer/Other (Leave the default option)
- Select a Subject (Other)
- Select a Country (India)
- Email (type firstname.lastname@example.org)
- Comments or Questions (type Test Comments)
- Submit (click once)
- In the result page, highlight “Thank you for taking the time to contact GE”
- Right Click and Select waitForTextPresent “Thank you for taking the time to contact GE”
- Highlight “Feel free to continue browsing.”
- Right Click and Select VerifyTextPresent “Feel free to continue browsing.”
- Right Click on “GE.com Home Page” link and Select verifyElementPresent “link=GE.com Home Page”
|clickAndWait||link=Feedback & Inquiries|
|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