There are many easy to use testing automation tools on the market.  There are many powerful testing automation tools on the market.  There are, however, rather few that are both.  Selenium is one that stands out, though and it is the tool that I most often use.  In this tutorial, I’ll demonstrate a quick way to create simple tests using the tool.

  • Download your Selenium IDE from Selenium HQ
    • This IDE is actually a plugin for FireFox.  While you can play your tests back in multiple  browsers
    • You can also install the plugin by opening FireFox and installing the Extension “Selenium IDE”

 

 OK, those are the parts, let’s get busy with an actual test.  We’llkeep it simple and start with a single testcase.*For the following instructions, things in RED should be steps that you take in FireFox. Items in BLUE are steps that you’ll take in theSelenium IDE window.

  1. Open Firefox to www.google.com
  2. Open Selenium IDE by going to “tools” and clicking on “Selenium IDE”
  3. Verify that your Base URL is set to “http://www.google.com”
  4. In the search bar, type “Eddy Jones” and hit [ENTER]
  5. Click the first link that will take you to estevenjones.com
  6. Highlight the title “The Blog” on the estevenjones.com home page
  7. Right click on the highlighted text and select “VerifyTextPresent The Blog” (this is one of the new Context Menu items that was added when you installed the Selenium IDE
  8. Click “Hubble Space Telescope” link in the story about the Hubble Space Telescope (or any other link on any other story)
  9. Right click on one of the images and hover over “Show All Available Commands >”   and from there, select “AssertElementPresent <some identifier here>”
In order to play back your tests, simply press the green arrow “play buttons” on the toolbar.

WHAT???  Why did my tests fail??

Well, your tests probably failed here, but that’s ok.  This really demonstrates the speed of Selenium.  Your test most likely failed because Selenium tried to move on to the next step before the web page finished rendering.  So it tried to click on your next link before the link was actually on the page.  There are two ways to handle this.  The quick but bad way would be to adjust the speed of your test by adjusting the slider on the toolbar.  This would allow the web pages a chance to render prior to Selenium trying to act on it.  The better way to handle this would be to change the “click” commands to “ClickAndWait” commands, though.  This way, Selenium will wait for the page to completely render before moving on to the next command.  One thing to note about this method, however, if you are testing a page that has frames, you might run into problems withFireFox.  FireFox says the page is completed once the Frameset is complete rather than waiting for the contents of the frame have completely rendered.

Also before I sign off for this first tutorial, I’ll mention the difference between Assert and Verify

When you ASSERT that an element is present, you are telling Selenium to stop the test and proceed no further if the assertion is not valid.  So, if I assert that an image is present and that image is NOT present, Selenium will not move on and all testing will stop.  The test will be marked a failure.

When you verify something is present, you are looking for something that is not terribly important enough to stop the entire test if it’s not.

An example of when I might use assert versus using a verify:

If I loaded a web page displayed a render time, I might want to verify that the render time was under 5 seconds, but I wouldn’t necessarily think that it’s a total failure if it took 6 seconds to render.  I would want to use an assert to verify that it didn’t take longer than 10 seconds because 10 seconds is way past my threshold for acceptable render times and there is no point in continuing my tests if it takes longer than that.

 


Comments

Due to the fact that high end rendering technology is becoming more and more accessible and the number of people interested in architectural visualization is growing rapidly, the quality level of architectural renderings has dramatically increased during the last years. When V-Ray rendering engine first appeared, using global illumination in a rendering was enough to make it look photorealistic and differentiated itself from the competition. Nowadays one has to go to great lengths if extreme photorealism is the main focus...

Reply
04/20/2016 10:19am

This isn’t too bad during the winter months, but it will cause your energy bills to go way up throughout the summer months.

Reply
05/30/2016 1:40am

nice blog.thanks for sharing.Visualizing the advancement preceding its development Enhanced effectiveness amid task improvement. Reducing the potential outcomes of reproduction.

Reply
05/30/2016 1:40am

nice blog.thanks for sharing.

Reply
05/30/2016 1:40am

nice blog.

Reply
05/31/2016 12:09am

I use Selenium for testing my site and it give me an outstanding result. Before this, i check my site with seosmalltools.com, which have more wonderful tool for getting page rank, keyword search as well as back link checker. Now, i use your Selenium for checking my site.

Reply

nice blog.thanks for sharing.We are a dedicated team of professionals offering training in the most sought after programmed VRay for architects, designers and engineers

Reply

nice blog.We are a dedicated team of professionals offering training in the most sought after programmed VRay for architects, designers and engineers

Reply

Really effectively written, I hope next time is usually fantastic, thanks for sharing..

Reply

Buoyancy Technologies is a Premier IT Training & Consultation Institute in Chennai that provides High quality, Job Oriented Training programs for Oracle, Cloud Computing, Java, Web, DBA, Software Testing and Microsoft technologies.

Reply

Buoyancy Technologies is the best software training institute in Chennai.

Reply

Buoyancy Technologies in Chennai, provides the best training for students to enter the field of Information Technology.

Reply
01/04/2017 11:01am

This is like a simple test case. If you want to do something cool you need to know Java language a little bit.

Reply

Salesforce.com Training Chennai with real-time and placement focused Salesforce training in chennai for Administrators, Developers, Solution Experts, and End Users.

Reply
01/26/2017 11:40pm

Android mobile development platform offer complete software for mobile devices that includes operating system, key mobile applications and middle-ware.

Reply
02/02/2017 11:12pm

The base for Selenium is Java. Without Java knowledge it may be difficult to use Selenium. Learn both Java and Selenium as a package with College to Corporate.

Reply
05/08/2017 3:58am

Selenium WebDriver is one of the most desirable skill sets in today's demanding market. This course focuses on principles of effective usage of Selenium WebDriver with Java and TestNG.

Reply
05/22/2017 3:56am

Expert Android Training in Chennai topics taught by experienced Android developers with extensive real-world experience. Awarded as the Best Android Training Center in Chennai, We Guarantee Your Android Training Success in Chennai.

Reply

Codingcub, the best Java training in Chennai, aiming to provide the quality training with placement for our students and we shape the career path of each of our student with special care.

Reply

We are the leading software training institute in Chennai started with an aim to provide 100% placement along with strong knowledge on software testing

Reply
06/15/2017 8:00am

We are the leading software training institute in Chennai started with an aim to provide 100% placement along with strong knowledge on testing

Reply

CodingCub provides the best Java training in Chennai. Aim of CodingCub is to provide quality career oriented training for our students. We have well-experienced and good knowledge professional trainers from the industry.

Reply

CodingCub provides the best Java training in Chennai. Aim of CodingCub is to provide quality career oriented training for our students.

Reply

Rated as No 1 Oracle training institute in Chennai for certification and Assured Placements. Our Job Oriented Oracle training in Chennai courses are taught by experienced certified professionals with extensive real-world experience.

Reply
07/27/2017 5:43am

Best school in the hitek school.

Reply
07/28/2017 6:27am

best softwer

Reply
08/01/2017 10:21pm

software development, audio engineering, and short stories. Quality Assurance · Selenium.

Reply
08/09/2017 5:13am

Eddy's take on software development, audio engineering, and short stories. Quality Assurance · Selenium · Selenium Ide · Software · Testing · Verify · Writing.

Reply
08/10/2017 4:07am

Thanks for your post.

Reply
08/11/2017 2:35am

Thanks for your blog.

Reply
08/23/2017 12:01am

QA training and experience it will inevitably push them to approach the issue in the ... Quality Assurance Training & Job Placement assistance.

Reply
08/29/2017 11:42pm

Eddy's take on software development, audio engineering, and short stories. 17 Comments. There are many easy to use testing automation tools on the market.

Reply
08/30/2017 11:33pm

Thanks for sharing your blog.

Reply
09/05/2017 12:35am

Nice blog.

Reply
09/08/2017 11:55pm

Login Mosquitonet - Prevent your family from mosquitoes with the Best Saint Gobain Mosquito Net Dealers in Chennai.

Reply

Selenium Is A Broadly Utilized Open Source Web Computerization Instrument Created By Thoughtworks.

Reply
09/17/2017 4:17am

Beauti Queen amazing kolkata escorts agency alwyas ready for you at your doorstep. Beauti Queen provide you high profile independent girl in kolkata, escorts service in kolkata, kolkata escorts. If you are looking for the ultimate encounter in Kolkata then I am your sophisticated young Kolkata escorts that provides upscale companionship for making your night becomes true.

Reply
09/19/2017 10:53pm

Thanks for sharing your blog.

Reply
09/20/2017 3:30am

We provide low price mosquito net service. All kind of high quality mosquito net available in login enterprises based on customer expectations

Reply
09/25/2017 1:38pm

Jiya Roy is a high class luxury and premium independent escorts agency in Gurgaon offering sexy independent escort Girls, models and cheap rate call girls for incalls and outcalls and travel arrangements. Female companions available 24/7 for business events, tour guide and much more.

Reply
09/28/2017 5:34am

Gurgaonfemales.in

Reply
10/04/2017 2:31pm

Renu Das Kolkata Escorts Services has gorgeous females provides Independent Escorts Service in Kolkata call girls at 100% satisfaction with VIP models. Provided Kolkata escorts at our agency are professional in nature and are eager to serve you at your place.

Reply
10/07/2017 10:47am

Welcome Guys| http://www.gurgaondivas.com/. We are providing Best Escort Service in Gurgaon with affordable rates, just call us for Hi profile Call Girls in Gurgaon . Contact us for Call Girl in Gurgaon. 9971089475

Reply
10/10/2017 1:50am

Thanks for sharing your blog.

Reply

We offer the best Java training in Chennai and we provide 100% job placement assistance. We have trainers from MNC companies with more than 10 years of experience

Reply
10/26/2017 12:22am

Best Java training institute in Chennai with 100% placement assistance.

Reply

rktraining provides best training in chennai with 100% placements.

Reply



Leave a Reply