Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

0
how to execute the IEBROWSER IN SELENIUM GRID.

Solved 1 Answers 56 Views
0 1
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="sampleTestSuite" verbose="1" >

 <test name="grid1">
 <parameter name="browserName" value="internetExplorer"></parameter>
 <parameter name="version" value="11"></parameter>
 <parameter name="platform" value="WINDOWS"></parameter>
    <classes>
      <class name="Selenium.grid1"/>
    </classes>
  </test>
</suite>
 

MY CODE LIKE

    private WebDriver driver;
    @Parameters({"browserName","version","platform"})
    @BeforeMethod
    public void beforemethod(String browserName,String version,String platform ) throws MalformedURLException
    {
        DesiredCapabilities cap;
        if(browserName.equals("firefox"))
       
         cap=DesiredCapabilities.firefox();
         
         else if(browserName.equals("chrome"))
             cap=DesiredCapabilities.chrome();
       
         else if(browserName.equals("internetExplorer"))
             cap=DesiredCapabilities.internetExplorer();
       
         else
             cap=DesiredCapabilities.firefox();
        cap.setCapability("platform",platform);
             
        if(version!=null)
            if(!version.equals(""))
        cap.setVersion(version);
       
   
       
   
        driver=new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"),cap);
        driver.navigate().to("https://akt-on.com/akton-kc/Account/Login?ReturnUrl=%2Fakton-kc%2F");
       
    }

1 Answer

0
Best answer
0
You can setup IE by downloading IEDRIVERSERVER from selenium.org. you can Google it for latest version.

You can set it up the same way you are setting chrome  driver. You have to use webdriver.ie.driver in your command line and set path to IEDriverServer.

Hope it helps.
answered by
selected by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...