• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Programming Languages
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials
  • Automation Tools and Different Tools
    • Web Automation
      • Selenium with Java
        • Selenium Basic
        • Selenium Advance
        • Selenium Realtime
        • Framework
        • Selenium Interview
        • Selenium Videos
        • Selenium with Docker
      • Selenium with Python
      • WebdriverIO
        • Selenium Webdriver C# Tutorial
      • Cypress
      • Playwright
    • TestNG
    • Cucumber
    • Mobile Automation
      • Appium
    • API Testing
      • Postman
      • Rest Assured
      • SOAPUI
    • testRigor
    • Katalon
    • TestProject
    • Serenity BDD
    • Gradle- Build Tool
    • RPA-UiPath
    • Protractor
    • Windows Automation
  • Automation For Manual Testers
  • Services
  • Online Training
  • Contact us
  • About me
  • Follow us
    • Linkedin
    • Facebook Group
    • Facebook Page
    • Instagram

Automation

Selenium WebDriver tutorial Step by Step

You are here: Home / Advance Selenium / Cross Browser Testing using Selenium Webdriver

Cross Browser Testing using Selenium Webdriver

November 23, 2018 by Mukesh Otwani 91 Comments

Cross browser testing in Selenium Webdriver

Hello Welcome to Selenium tutorial, today we will discuss Cross Browser Testing using Selenium Webdriver.

What is Cross browser testing?

Cross browser, testing refers to testing the application in multiple browsers like IE, Chrome, Firefox so that we can test our application effectively.IE, Chrome, Firefox so that we can test our application effectively.

Cross browser, testing is a very important concept in Automation because here the actual automation comes into the picture.

Example- Suppose if you have 20 test cases that you have to execute manually, so it is not a big deal right we can execute in 1 day or 2 days. However, if the same test cases you have to execute in five browsers it means 100 test cases then probably you will take one week or more than one week to do the same and it will be quite boring as well.

If you automate these 20 test cases and run them then it will not take more than one or two hour depends on your test case complexity.

What is the need of Cross Browser Testing using Selenium Webdriver

For the better experience, we need to do cross browser testing so that customer will get the same UI of application even if he use different or any browser.

Let me list down a few reasons why we should perform cross browser testing

1- Browser compatibility with different OS.

2- Image orientation

3- Each browser has the different orientation of Javascript which can cause issue sometimes.

4- Font size mismatch or not rendered properly.

5- Compatibility with the new web framework.

 

Cross Browser Testing using Selenium Webdriver

To achieve this we will use TestNG parameter feature, we will pass the parameter from TestNG.xml file, and based on our parameter Selenium will initiate our browsers.

In this scenario, we will run the same test case with two different browser parallel.

Step 1- Write testcase

package SampleTestcases;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

public class TestCase1 {

@Test

// Here this parameters we will take from testng.xml
@Parameters("Browser")
public  void test1(String browser) {

if(browser.equalsIgnoreCase("FF")){

WebDriver driver=new FirefoxDriver();

driver.manage().window().maximize();

driver.get("http://www.facebook.com");

driver.quit();

}
else if(browser.equalsIgnoreCase("IE")){

System.setProperty("webdriver.ie.driver", "./server/IEDriverServer.exe");

WebDriver driver=new InternetExplorerDriver();

driver.manage().window().maximize();

driver.get("http://www.facebook.com");

driver.quit();
}
}

}

 

Step 2- Create testng.xml and specify

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
Here parallel is an attribute which specify the mode of execution and thread-count specify how many browser should open
<suite name="Suite" parallel="tests" thread-count="2">

<test name="Test">

<parameter name="Browser" value="FF" />

<classes>

<class name="SampleTestcases.TestCase1"/>

</classes>

</test>

<test name="Test1">

<parameter name="Browser" value="IE" />

<classes>

<class name="SampleTestcases.TestCase1"/>

</classes>

</test>

</suite>

 

Step 3- Run this xml file refer the below screenshot.

Note- To create testng.xml- Right, click on your testcase then go to TestNG then convert to TestNG> It will generate testng.xml then make changes as per above xml file and finish. You will get testng.xml file inside the project

 

Cross Browser Testing using Selenium Webdriver

Verify the output.

 

 

Cross Browser Testing using Selenium Webdriver

 

Note- For Cross Browser Testing using Selenium Webdriver you have to execute through testng.xml only.

Thanks for visiting my blog. Keep in touch.

Have a nice day 🙂

For More updates Learn Automation page

For any query join Selenium group- Selenium Group

Filed Under: Advance Selenium Tagged With: Cross Browser Testing using Selenium Webdriver

Reader Interactions

Comments

  1. Pratiksha nigade says

    May 22, 2021 at 5:28 PM

    Hello mukesh I have one doubt why you don’t give the sysytem.set.property for Firefox. And you did not give the system.set.property still how it is executing

    Reply
    • Mukesh Otwani says

      May 23, 2021 at 7:19 AM

      Hi Pratiksha,

      This is pretty much old video. At that time, Firefox doesn’t require any driver but now it requires geckodriver. Please refer this link https://learn-automation.com/use-firefox-selenium-using-geckodriver-selenium-3/

      Reply
  2. Amartya says

    May 11, 2019 at 8:07 PM

    Hi Mukesh
    In this video you have discussed how to pass to pass single parameter.Can I get the link the video where you have discussed multiple parameters??

    Reply
    • Mukesh Otwani says

      May 13, 2019 at 2:17 PM

      Hi Amartya,

      Under test tag, you can another parameters as per your requirement.

      Reply
  3. saurabh misra says

    May 6, 2019 at 6:58 PM

    Hi Mukesh,

    How can we tackle the situation when an application behaves differently in different browser?

    Reply
    • Mukesh Otwani says

      May 6, 2019 at 9:25 PM

      Hi Saurabh,

      Usually locator selection matters most where CSS Selector is preferable to work with all browser. For other Ui changes, try to find locator best DOM property which shopuld most likely to work. Apart from this, we have to handle specifically for each browser.

      Reply
  4. KRISHNA MOJUMDER says

    April 8, 2019 at 7:15 AM

    your videos are excellent. – try to go little slow.

    Reply
    • Mukesh Otwani says

      April 8, 2019 at 7:40 AM

      Hi Krishna,

      Sure…:)

      Reply
  5. SATVEER BAJWA says

    February 21, 2019 at 9:34 PM

    Hi Mukesh,

    I am using testing for cross browser testing but for Mozilla I am getting this error :
    org.openqa.selenium.WebDriverException: Timed out waiting 45 seconds for Firefox to start. I put this driver.manage().timeouts().pageLoadTimeout(50,TimeUnit.SECONDS); before get page. Please help me to solve this issue

    Reply
    • Mukesh Otwani says

      February 22, 2019 at 1:33 AM

      Hi Satveer,

      Is it happening with other urls’ too?

      Reply
  6. Mathi says

    February 20, 2019 at 2:43 PM

    Hi Mukesh,
    I am trying to automate my project application. i need to click on the right arrow button the application. I got the below error “element is not clickable at point because another element obscures it”
    Exception Name: org.openqa.selenium.ElementClickInterceptedException

    When i use the particular code in different class, then the element is clicking.
    When i run the code the from the login page, the element is not clicking instead of the error is displayed.

    Kindly help me in the scenario.

    Thanks,
    Mathi

    Reply
    • Mukesh Otwani says

      February 21, 2019 at 12:09 AM

      Hi Mathi

      Use webdriver wait for ElementToBeClickable inside fluent wait. If this doesn’t work the try with JavaScript click action.

      Reply
    • Mukesh Otwani says

      February 21, 2019 at 12:12 AM

      Hi Mathi

      Use webdriver wait for ElementToBeClickable inside fluent wait. If thsi doesn’t work the try with JavaScript click action

      Reply
  7. Ashish says

    February 20, 2019 at 2:37 PM

    Hi Mukesh,

    Can you help me out regarding webdriverIO + cucumber set up (configuration on windows) OR please try to add a tutorial regarding this on your site.

    Reply
    • Mukesh Otwani says

      February 21, 2019 at 12:05 AM

      Hi Ashish,

      I will upload videos of WebdriverIO soon…:)

      Reply
  8. SATVEER BAJWA says

    February 14, 2019 at 8:58 PM

    Hi Mukesh,

    Hope you are doing great. I would like to ask you one question regarding selenium with java. I wanted to run multiple test cases in one class but I don’t want to write all testcases again and again like for same function signup. Is there any way to overcome the rewrite code.

    Thanks
    Satveer

    Reply
    • Mukesh Otwani says

      February 15, 2019 at 12:26 PM

      Hi Satveer,

      Yes, you don’t need to write same lines of code again and again. Better you create reusable method for same and call it.

      Reply
      • SATVEER BAJWA says

        February 16, 2019 at 2:26 AM

        Okay Great!. Thanks a lot. Through the help of your tutorials I have learnt TestNG and many more functions..,Thanks a lot

        Reply
        • Mukesh Otwani says

          February 16, 2019 at 8:43 PM

          Hi Satveer,

          You’re welcome…:)

          Reply
  9. SATVEER BAJWA says

    January 24, 2019 at 1:03 AM

    Hi Mukesh,
    I am following your video above mentioned but not able to run successfully, getting this error when running my script

    [Utils] [ERROR] [Error] org.testng.TestNGException:
    Parameter 'Browser' is required by @Test on method verifypagetitle but has not been marked @Optional or defined
    in C:\Users\satveer\AppData\Local\Temp\testng-eclipse-2070363565\testng-customsuite.xml
    FAILED: verifypagetitle

    ===============================================
    Default test
    Tests run: 1, Failures: 1, Skips: 0
    ===============================================

    Reply
    • Mukesh Otwani says

      January 24, 2019 at 3:36 PM

      Hi Satveer,

      As per this statement Parameter ‘Browser’ is required by @Test on method verifypagetitle but has not been marked @Optional or defined*, it requires Browser parameter to be passed as VM argumnets or pass it from testng.xml.

      Reply
      • SATVEER BAJWA says

        January 24, 2019 at 7:03 PM

        Okay Thanks Mukesh. But Could you please suggest me to to solve this issue so I can run successfully my script.

        Reply
        • SATVEER BAJWA says

          January 24, 2019 at 7:53 PM

          Hi Mukesh,
          Thanks for your help. Yes it works for me now. but it runs only internet explorer not Firefox there is error in console
          java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases

          Reply
          • SATVEER BAJWA says

            January 25, 2019 at 12:53 AM

            if I can setup path gecko driver then it opens the browser but not get the url

          • Mukesh Otwani says

            January 25, 2019 at 1:46 PM

            Hi Satveer,

            Use latest version of Selenium with latest gecko driver but use 1 or 2 previous version of firefox and try.

          • Mukesh Otwani says

            January 25, 2019 at 1:43 PM

            Hi Satveer,

            Kindly check this link http://learn-automation.com/use-firefox-selenium-using-geckodriver-selenium-3/

        • Mukesh Otwani says

          January 25, 2019 at 1:41 PM

          Hi Satveer,

          Provide browser parameter through testng.xml or through vm arguments…

          Reply
  10. Alejandro says

    January 23, 2019 at 7:37 AM

    Excellent web site you have got here.. It’s difficult to find good quality writing
    like yours nowadays. I truly appreciate people like you!
    Take care!!

    Reply
    • Mukesh Otwani says

      January 23, 2019 at 1:32 PM

      Hi Alejandro,

      Very very thanks alot for your valuable comments and appreciation. I’ll try my level best to keep my blog readers update with new topics.
      Please be in touch…:)

      Reply
  11. Richa Binani says

    January 21, 2019 at 12:00 PM

    Hy Mukesh, I am having the issue in very simple code:-
    driver.quit(); is not closing all the windows I have opened, its working like driver.close();
    Please help

    Code:-

    package practice;
    import org.openqa.selenium.By;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.chrome.ChromeDriver;
    import org.openqa.selenium.firefox.FirefoxDriver;

    public class Demo {
    WebDriver driver;
    public void open() throws InterruptedException
    {
    System.setProperty(“webdriver.chrome.driver”,”C:\\Users\\gten-
    008\\Downloads\\jars\\chromedriver_win32\\chromedriver.exe”);
    driver=new ChromeDriver();
    driver.get(“https://www.facebook.com/”);
    }
    public void go()
    {
    driver=new ChromeDriver();
    driver.get(“https://www.google.com/”);
    }
    public void hide()
    {
    driver.quit();
    }
    public static void main(String[] args) throws InterruptedException {
    demo d=new demo();
    d.open();
    d.go();
    d.hide();
    }
    }

    Reply
    • Mukesh Otwani says

      January 21, 2019 at 2:50 PM

      Hi Richa,

      In your code. you have initialized same webdriver object twice in different methods that is the reason, one window is always getting closed. driver.quit() always close the instance of window which it is holding at that time.

      Reply
      • Richa Binani says

        January 22, 2019 at 11:47 AM

        Then what should I do if I want to open 2 different browsers or 2 different windows of the same browser and want to close them altogether?
        Driver.quit(); will be useful in this case?
        Please tell…

        Reply
        • Mukesh Otwani says

          January 23, 2019 at 1:32 PM

          Hi Richa,

          In your case, you need to have two driver objects of same browser like driver_1 & driver_2 and call driver_1 & driver_2 quit() methods separately.

          Reply
          • Richa Binani says

            January 23, 2019 at 3:03 PM

            Thank you so much for clearing my doubt.

          • Mukesh Otwani says

            January 23, 2019 at 6:07 PM

            Hi Richa,

            You are always welcome…:)

  12. upkar singh says

    January 11, 2019 at 12:44 PM

    Can we run multiple browser parallely, because i run the same and in my case it launch both browser but script run only in one browser.

    Reply
    • Mukesh Otwani says

      January 14, 2019 at 2:29 AM

      Hi Upkar,

      If you have mentioned test class twice, each with different browser along with parallel and thread-count values then it should work properly. Kindly cross verify testng.xml file contents.

      Reply
      • Upkar Singh says

        January 14, 2019 at 11:46 AM

        Hi Mukesh,

        Thank you for your response, actually i’m new to automation from my end i think it’s right, can you please look up to my code?

        Reply
        • Mukesh Otwani says

          January 16, 2019 at 10:50 AM

          Hi Upkar,

          Please send your code to my email I will cross check mukeshotwani@learn-automation.com

          Reply
  13. Tharanga says

    January 5, 2019 at 8:39 PM

    Hi Mukesh,

    Need help from you. I watched your video and getting this error

    [RemoteTestNG] detected TestNG version 6.14.2
    org.testng.TestNGException:
    Cannot find class in classpath: com.CrossBrowser.CrossBrowser
    at org.testng.xml.XmlClass.loadClass(XmlClass.java:77)
    at org.testng.xml.XmlClass.init(XmlClass.java:69)
    at org.testng.xml.XmlClass.(XmlClass.java:55)
    at org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:575)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)

    Please advice

    Reply
    • Mukesh Otwani says

      January 10, 2019 at 10:42 AM

      Hi Tharanga,

      Kindly check this line Cannot find class in classpath: com.CrossBrowser.CrossBrowser whether you have given correct name of file in testng.xml file. It should be package name with file name.

      Reply
  14. NIlesh says

    November 25, 2018 at 5:30 PM

    . Thanks for sharing this video

    Reply
    • Mukesh Otwani says

      November 29, 2018 at 9:36 AM

      You are always welcome…:)

      Reply
  15. Mohinni says

    February 20, 2017 at 11:07 AM

    Thanks for explaining cross browser testing in easy words.

    Reply
    • Mukesh Otwani says

      February 20, 2017 at 1:46 PM

      Welcome Mohinni, Keep learning.

      Reply
  16. Vina says

    February 10, 2017 at 8:03 AM

    Thanks Mukesh.

    Reply
    • Mukesh Otwani says

      February 10, 2017 at 7:06 PM

      Hi Vina,

      Your comments are driving force for me.

      Reply
  17. srinivas says

    February 1, 2017 at 8:45 PM

    Hi Mukesh,

    I have tried to execute the program which you explained in the video.For firefox it is working fine but for Chrome & IE it was not working , browsers are not even launched..The below is the error i got
    org.openqa.selenium.remote.SessionNotFoundException: The FirefoxDriver cannot be used after quit() was called.
    Build info: version: ‘2.53.1’, revision: ‘a36b8b1’, time: ‘2016-06-30 17:37:03’
    System info: host: ‘LENOVO-PC’, ip: ‘192.168.0.20’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_111’
    Driver info: driver.version: RemoteWebDriver

    Reply
    • Mukesh Otwani says

      February 2, 2017 at 2:51 PM

      Dont call the quit browser in after method always call @AfterSuite

      Reply
  18. Gaurav Khurana says

    January 14, 2017 at 3:11 PM

    Thanks Never knew it was so easy to do cross browser testing… thanks for explaining in the simplest way

    Reply
    • Mukesh Otwani says

      January 14, 2017 at 6:54 PM

      Gaurav….Thanks for your comments.

      Reply
  19. Shailesh says

    December 19, 2016 at 4:58 PM

    its Very goood , Really helpfull..
    Tysm…..

    Reply
  20. Shailesh says

    December 19, 2016 at 3:36 PM

    I completely learn automation from your videos. No attend any classes or tutorials. It’s Very helpful. Tysm Mukesh

    Reply
    • Mukesh Otwani says

      January 11, 2017 at 3:33 PM

      Thanks Shailesh I am glad you liked it. Keep visiting.

      Reply
  21. Nikhil says

    November 30, 2016 at 7:52 PM

    Getting the below error:
    Parameter ‘browser’ is required by @Test on method Verify_Title but has not been marked @Optional or defined

    Reply
    • Mukesh Otwani says

      November 30, 2016 at 8:15 PM

      Hi Nikhil,

      You have not accepted parameter in @Test kindly check code and video again to fix this issue.

      Reply
  22. Navinkumar Choudhary says

    November 25, 2016 at 7:17 PM

    Mukesh I like your all the tutorials. Just dam explanation. Thanks the work doing for the people/candidates.

    Reply
    • Mukesh Otwani says

      December 6, 2016 at 2:21 PM

      Thank you so much Navin 🙂

      Reply
  23. iswarya says

    November 4, 2016 at 10:21 PM

    really nice video. it helps me alot.
    thanks

    Reply
    • Mukesh Otwani says

      November 4, 2016 at 10:34 PM

      Thanks Iswarya, Keep visiting.

      Reply
  24. Aayushi says

    October 5, 2016 at 11:55 AM

    Thank you sir 🙂

    Reply
    • Mukesh Otwani says

      October 5, 2016 at 11:08 PM

      Most welcome Aayushi

      Reply
  25. Aayushi says

    October 1, 2016 at 5:37 PM

    hello sir,

    my code is not running in firefox browser, when i gave the command to open facebook page,its simply open the browser but not the particular page. I used the same code as you mentioned

    Reply
    • Mukesh Otwani says

      October 3, 2016 at 4:27 PM

      Hey Aayushi,

      Yes correct but recently Selenium has some changes. Kindly check below article to fix ff issue http://learn-automation.com/use-firefox-selenium-using-geckodriver-selenium-3/

      Reply
  26. Mahan says

    September 28, 2016 at 2:24 PM

    Hello Sir..

    Am not able to run the Firefox code in the Chrome driver by using the framework

    Reply
    • Mukesh Otwani says

      September 29, 2016 at 10:41 AM

      Hi Mahan,

      I got confused with your question 🙁 Kindly frame it again.

      Reply
  27. Harini says

    September 7, 2016 at 1:16 PM

    ThankYou So Much sir For your Video…It’s really Helpful…………………………..

    Reply
    • Mukesh Otwani says

      September 7, 2016 at 11:47 PM

      Welcome Harini 🙂 Keep visiting and let me know if any help.

      Reply
  28. manisha says

    September 7, 2016 at 11:10 AM

    Hi sir,
    when i m running my script just watever you said in this crossbrowser testing video, mozilla and chorme are working fine but In internetExplorer, it is returning title as Webdriver and unable to close it .still my TestNG reports is showning like 3 test cases run successfully. i m unable to find the solution of it. plz help me out.

    Reply
    • Mukesh Otwani says

      September 7, 2016 at 11:49 PM

      HI Manisha,

      You can check below article and make the changes in IE before execution.

      Reply
      • manisha says

        September 14, 2016 at 12:07 AM

        its working……. thanks a lot.

        Reply
        • Mukesh Otwani says

          September 15, 2016 at 4:41 PM

          Cheers Manisha

          Reply
    • Gaurav Khurana says

      January 14, 2017 at 2:56 PM

      May be you are using drv.close().

      With IE it does not work . Try using drv.quit();

      i tried with close() IE did not close but with quit it got closed

      Reply
      • Mukesh Otwani says

        January 14, 2017 at 8:29 PM

        Hi Gaurav

        driver.close() -> Close the browser window on which currently focus is lying
        driver.quit() -> Close all browser windows and ends driver session

        But sometimes on windows environment even though you quit driver but still you can observe IEDriverServer.exe & chromedriver.exe instance running in processes list. In order to kill these process, you can call java methods like WindowsUtils.killByName(processName) or WindowsUtils.killPID(processID);

        Reply
  29. Shah says

    April 22, 2016 at 3:52 PM

    Hi,Mukesh!
    I tried with Microsoft Edge,driver launch the browser but didn’t went to desired page,in output it shows configuration error=1,one test skips,any idea.
    Thank you for your great effort to serving the community.

    Reply
    • Mukesh Otwani says

      April 26, 2016 at 5:41 PM

      Thanks Shah 🙂 Edge browser not tried as such.

      Reply
  30. U johnson says

    March 15, 2016 at 2:41 AM

    HI mukesh i am getting the error while executing this code, can help me with this

    org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 1; Content is not allowed in prolog.
    at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:320)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:89)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
    Caused by: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 1; Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.testng.xml.XMLParser.parse(XMLParser.java:38)
    at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:16)
    at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:9)
    at org.testng.xml.Parser.parse(Parser.java:172)
    at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:300)
    … 3 more

    Reply
    • Mukesh Otwani says

      March 20, 2016 at 7:29 PM

      Hi johnson,

      Seems like some issue with testng.xml file. Please cross check once or send me testng.xml to me for checking.

      Reply
  31. sriram says

    March 9, 2016 at 11:47 PM

    Thanks for the clear explanation about cross browser testing

    Reply
    • Mukesh Otwani says

      March 13, 2016 at 12:05 PM

      Thanks Sriram

      Reply
  32. vijay says

    February 18, 2016 at 10:23 PM

    its goood , helpfull

    Reply
    • Mukesh Otwani says

      February 22, 2016 at 9:06 AM

      Hi Vijay,

      Thank you.
      Please check other articles too and let me know if any help needed from my side 🙂

      Reply
  33. Alunkan says

    February 4, 2016 at 3:21 PM

    Hi Mokesh, Thanks for your effort. it seems text box value inserting is not happening as expected while running browser Pararell.i have tried same (above code) and extend to insert values to text boxes..But result was unlucky for me. could you please help me on this ?

    Reply
    • Mukesh Otwani says

      March 3, 2016 at 4:58 PM

      Hi Alunkan,

      Can you please share the application as well because I tried now and it is worked as expected.

      Reply
  34. Raja says

    November 25, 2015 at 7:51 PM

    Hi mukesh, Here in the above example the same code is repeating in Firefox and IE, ri8. Is there any optimize way to reduce this?

    Reply
    • Mukesh Otwani says

      November 25, 2015 at 8:50 PM

      Hi Raja,

      You can keep only browser initialization code inside if statement to reduce piece of code.

      Thanks
      Mukesh

      Reply
  35. Raja says

    November 25, 2015 at 11:45 AM

    Thanks friend for your knowledge sharing.

    Reply
    • Mukesh Otwani says

      November 25, 2015 at 1:33 PM

      thanks

      Reply
  36. Raja says

    November 24, 2015 at 9:16 PM

    Again sorry, It is working perfectly. Thanks for your knowledge sharing.

    Reply
    • Mukesh Otwani says

      November 25, 2015 at 9:13 PM

      Thanks Raja

      Reply
  37. Raja says

    November 24, 2015 at 8:49 PM

    Sorry, It is fixed. this is because of small typo mistake in .xml file.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Free Selenium Videos

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

Search topic

Top Posts & Pages

  • Selenium Webdriver tutorial for beginners
  • How To Fix Eclipse Autocomplete Or Code Suggestion In Eclipse
  • Selenium Webdriver C# Tutorial
  • WHAT ARE YOUR EXPECTATIONS FROM US?

Stay connected via Facebook

Stay connected via Facebook

Archives

Footer

Categories

Recent Post

  • API Testing Using Postman And RestAssured
  • Disable Personalise Your Web Experience Microsoft Edge Prompt In Selenium
  • How To Fix Error: No tests found In Playwright
  • How To Fix Eclipse Autocomplete Or Code Suggestion In Eclipse
  • Best and easy way to Group test cases in selenium

Top Posts & Pages

  • Selenium Webdriver tutorial for beginners
  • How To Fix Eclipse Autocomplete Or Code Suggestion In Eclipse
  • Selenium Webdriver C# Tutorial
  • WHAT ARE YOUR EXPECTATIONS FROM US?