Skip to main content

What are Challenges faced using selenium Automation Testing

What are Challenges faced using selenium Automation Testing ?

Challenges faced using selenium Automation Testing
·        Dealing with pop-up windows
·        Testing dynamic text or content
·        How to go about testing Flash
·        Capturing screen shots, either to file or in some form of report
·        Iteration of the test case, running it repeatedly with some minor change
·        Data Driven Testing, using suites of pre-cooked data or generating it on the fly
·        Generating useful test status reports
·        Setting up Remote Control
·        Setting up Grid
·        handling Alerts Popups
·        Switching between windows
·        Working with frames.
·        Field validation
·        How to identify dynamic objects.
·        Xpath and CSS locators for identifying elements.
·        File Upload/Download Using : Java-AutoIT-Selenium
·        Handling Multiple Popup Windows.
·        Switching with multiple Windows
Example :
·        Need to Describes how did faced that problem and how did you overcome that problem with example as below.
   

  •      In Selenium, you identify a UI element with a locator.  There are many kinds of locators, e.g.IDs, names, and XPaths.  If you have never used XPath, you should expect to invest some time familiarizing yourself with it.  On Firefox, Firebug and Firepath are invaluable for inspecting the DOM and figuring out locators.
  •           On common problem with UI automation is dealing with timing issues, e.g. you press a button and it takes an indeterminate amount of time for the web page to refresh.  You can try hard-coding delays into your test or you can tell Selenium to wait for a element in the page to appear.  I recommend the latter.   I don't remember what the API is for that, but I imagine someone here can speak up about that.  
  •           Another recurring problem I've had, and which shows up repeatedly on the Selenium forums, has to do with tabbing between fields.  Selenium has APIs for filling in a text field and clicking a button, but it doesn't have an explicit "hit the Tab button while you're in this text field" API. The Selenium forums suggest various workarounds.  I think the appropriate workaround depends on the situation.  In my application, something special happens when the focus leaves a password field.  Under the covers, the app detects the focus leaving the field via a blur event.  I haven't figured out what action to tell Selenium to perform to cause a blur event to happen, but there is a "fireEvent" method on the Selenium interface that explicitly causes an event to fire.  

Few More :

  •  If something is changed without the knowledge of the Automation Tester like headings of the page or title of the page, the script will Fail.
  •   Even if the content team changed the text on the webpage which you might have captured it in your script for some reason the regression suite will fail. 

  •  If for any reason the servers are down and you running your test suit overnight, the test might Fail. If you don't have a dev or test environment, the automation script might cause loads on the Live server( In case you hitting one server ) which makes the server to collapse and this will effect the business. 


 If the requirements are constantly changing and the site is very dynamic, its very hard to automate.

Comments

Popular posts from this blog

API Testing With Selenium WebDriver

REST API Testing Framework We will be creating a simple Rest Testing Framework in Java and JUnit that could be used for any testing scenarios. Rest Testing Framework Overview The framework should be able to execute the basic REST operations (GET, POST, PUT, PATCH, DELETE) and perform the validations on the code, message, headers and body of the response. The completed code can be accessed from my  GitHub account   from where you can collect and make modifications based on your requirements. Design We will be having three classes for the framework (in package com.axatrikx.controller ) RestExecutor  : Performs the HTTP operations using Apache Http Client RestResponse  : A javabean class to hold our response values (code, message, headers, body) RestValidator  : Validates the response with the expected values The package  com.axatrikx.test  holds the test scripts. Note: I will be using ‘ json-server ‘ to fake the REST API. Its a real handy tool to r

ExtentReports in Selenium Webdriver

ExtentReports in Selenium Webdriver What is ExtentReport? ExtentReports  is a HTML reporting library for Selenium WebDriver for Java which is extremely easy to use and creates beautiful execution reports. It shows test and step summary, test steps and status in a toggle view for quick analysis Download Download the jar below: Download ExtentReports 1.4 (1623)    Snapshot of Extent report After Executing the Script   Program Steps:  We are going to write three different testcases. Pass Warning Fail TestCase with Pass Result Navigate to http://www.guvi.in Click on Sign-in Enter the credientials Check the URL is correct or not after login   TestCase with Warning Result Verify with the Wrong URL (static String Afterloginfail="http://www.guvi.in/ ")    TestCase with fail Result Click on Menu Select Tech Challenges Verify With wrong URL. Source Code: import  java.io.File; import  java.io.IOException; import   java.sql

How to Compare Two Images in Selenium

How to Compare Two Images in Selenium Some time in testing we have to do image comparision as verification point. So, in this blog I expalin how to compare two images in selenium. I have created one function for compare two images. you can use directly into your framework. first of all you have to import below packages into your code. import java.awt.image.BufferedImage; import java.io.File; import javax.imageio.ImageIO; Now, you can use below function for comparison of two images. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 public boolean mCompareImages ( BufferedImage img1 , BufferedImage img2 ) { boolean bCompareImage = true ; try { if ( img1 . getWidth () == img2 . getWidth () && img1 . getHeight () == img2 . getHeight ()) { for ( int i = 0 ; i < img1 . getWidth (); i ++) { for ( int j = 0 ; j < img1 . getHeight (); j ++) { if ( img1 . get