Home

Print

What Is Unique About Selenium Master

Dear Selenium Master Visitors: 

New video tutorials are being uploaded on the Youtube Channel every day. Do not forget to subscribe the channel. Below is the URL. Thanks. Cool

http://www.youtube.com/c/SeleniumMasterUSA

CoolCoolCoolCoolCoolCoolCoolCoolCoolCoolCoolCoolCoolCoolCoolCoolCoolCoolCoolCoolCoolCool

Selenium Master is your one stop shop for learning Selenium Test Automation technologies. To support larger Test Automation projects and minimize this site maintenance, all the contents are open to the public for free

 Selenium is an open source functional test automation tool,  and it is one of the most well-known testing frameworks in the world.Selenium allows testers and developers alike to develop functional tests to drive the browser. It can be used to record workflows so that developers can prevent future regressions of code. Selenium can work on any browser that supports JavaScript since Selenium has been built using JavaScript.

Selenium Master is your one stop shop for mastering various Selenium techniques to automate your web based application testing. You may have seen other sites that provide information about using Selenium. Those sites often use testing public websites like Google or Yahoo as examples.

However, in your testing, you mostly test internal applications that drive the business in your company or organization.Selenium master will provide guidelines for using Selenium test framework and various unit test level applications on this site and teach you how to use Selenium for testing. Most of the sample codes on this site will use Mahara ePortfolio system as a test application. You will learn the following technologies. 

  • Selenium Robot Framework 
  • Selenium IDE
  • Selenium RC
  • Selenium Grid
  • Selenium Web Driver with Java
  • Selenium Web Driver with .Net
  • Selenium Web Driver with Python
  • Selenium Web Driver with Ruby
  • Selenium Mobile Test with Selendroid
  • Selenium Appium Mobile Test Framework
  • Selenium Performance Test with TestNG
  • Selenium Performance Test with JMeter
  • Test Cases and Management
  • Software Development Life Cycle (SDLC)
  • SQL Database and Data Management
  • Job Interview Questions
Print

How to Generate PDF Report in Selenium WebDriver

In some cases, test engineers need to export or save Selenium WebDriver test result in Pdf file format.  In this example below, I will explain how to write test results as a pdf file. 

Login Test Case:

1. Go to http://www.seleniummaster.com/seleniummastertestapp/index.php
2. Enter "test" in the Username field
3. Enter "XXXX" in the Password filed
4. Click on the Login button
5. Verify that the text "Selenium Test" is present.

Step 1: on Eclipse, create a Java Project called SeleniumMasterLoginTestPdfExport. Add a package named com.seleniummaster.testresultpdfproject and then add two classes:

  • LoginTest class (this is a TestNG class)
  • PdfUtility class

and also, in the build path, add Selenium libraries and Apache Pdfbox library as reference jar files. 

Step 2: open PdfUtility.java file and write the code below

 

Print

Explicit and Implicit Waits in Selenium Web Driver

When implementing time synchronization for waiting with Selenium Web Driver technology, we can use two types of waits:

Explicit Wait

In Explicit Wait, we write a code to define a wait statement for certain condition to be satisfied until the wait reaches its timeout period. If WebDriver can find the element before the defined timeout value, the code execution will continue to next line of code. Therefore, it is important to setup a reasonable timeout seconds according to the system response.

For example:

Print

Using Selendroid For Mobile Web Test Automation

Selendroid is a test automation framework which drives off the UI of Android native and hybrid applications (apps) and the mobile web. Tests are written using the Selenium 2 client AP. In this example, you will learn how to use Selendroid for testing a mobile web application. Test site for this example is the Mahara ePortfolio demo site "http://demo.mahara.org".

Test case:

Admin user should be able to log on to the system.

Test Implementation

Step 1: Download the Selendroid Standalone Java libraries from this site "http://selendroid.io/". If latest build is available on this location, download the latest snapshot from here "http://ci.selendroid.io/job/selendroid/io.selendroid%24selendroid-standalone/".

Step 2: Install Android SDK from the android development site "http://developer.android.com/sdk/index.html" . And setup the android development environment according to the instruction on this site "http://spring.io/guides/gs/android/".

Print

Use Selenium Appium Automation For Mobile Apps

In this example, I will explain how to use Selenium Appium Automation for mobile app testing. 

Appium is an open source test automation framework for use with native and hybrid mobile apps. It drives iOS and Android apps using the WebDriver JSON wire protocol. 

Step 1: download the Appium Framework and sample example files provided by the site http://appium.io .  Click on the corresponding links to download the framework and sample files. 

Print

Use Selendroid to Test Mobile Web Application on Mobile Device

To assure the quality of mobile web application, we need to test mobile web application on real mobile devices instead of testing it on mobile emulator. This example teaches you how to test mobile web application on android mobile device. 

In this article, we use Ebay mobile site as a test application.  To identify web elements, please read the article titled "How to Identify Mobile Web Application Elements for Selendroid" . 

Test Case

Verify that users are able to search merchandise on Ebay mobile web site.

Test Step

Step 1: navigate to http://m.ebay.com

Step 2: type in android in the search box

Step 3: click on search button or press enter.

Step 4: assert that the website returns number of android merchandises.

Automation Test Implementation

Step 1: create a Java project named "SeleniumMasterMobileTest", add a package named "com.seleniummaster.mobiletest", and add a JUnit test class named "MobileWebTesteBayMobile.java". Make sure that in the build path, you referenced all required libraries as well as the Selendroid web driver library "selendroid-standalone-0.9.0-SNAPSHOT-with-dependencies.jar". 

Print

Selenium Robot Framework Video Tutorial

To help QA engineers and developers learn Selenium Robot Framework Python test automation, Selenium Master has created video tutorials and uploaded them onto Youtube. New videos will be created and uploaded onto Youtube each week, so visit the site more often for new video tutorials. Thanks for watching the video tutorials. 

Selenium Robot Framework Python Test Automation Video Tutorials

Title URL
Selenium Robot Framework Introduction https://www.youtube.com/watch?v=krd15Sbrt2Q

Selenium Robot Framework Installation

https://www.youtube.com/watch?v=rtB-tiW8w-U

Robot Framework Best Practices

https://www.youtube.com/watch?v=gUofisFLj5k

Selenium Robot Framework Python Test Script Example

https://www.youtube.com/watch?v=9dNS4dELa28
Robot Framework Python Test Case Automation Example https://www.youtube.com/watch?v=O0N4q9o1yIU

Resource File Robot Framework Test Automation

https://www.youtube.com/watch?v=0-4n1PwqMKQ

Run Robot Framework Tests Against Different Browsers

https://www.youtube.com/watch?v=rMS6-IycotE

Use Metadata and Environment Variable in Robot Framework

https://www.youtube.com/watch?v=yAit5Tnk1h8

Robot Framework Test Suite Test Case Setup/Teardown Method

https://www.youtube.com/watch?v=iI72ejNv0CM