power_settings_new

how to execute the IEBROWSER IN SELENIUM GRID.

by
asked
0 votes
64 views
<!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");
       
    }

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.

1 Answer

answered by
selected by
0 votes
 
Best answer
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.

Related questions

add
...