Selenium webdriver

aflorenceaflorence Posts: 7

Hi,

Can someone help me on setting up the Selenium WebDriver script with IE browser?
Actually i want to validate an entry in UI after the API is executed. And my UI application will work only in IE browser. So thought to add an extension tool after the API step. From extension tool i will call the JAVA class file(Selenium based)

I just started with the selenium script from JAVA plugin. But i am getting errors for a simple code. Please guide me in the list of jars to be added and drivers to placed. Any POM dependencies has to be added?

package scraping;

import java.io.IOException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.Test;

public class test {

public static void main(String[] args) throws IOException {
    Login();
System.out.println("Done");

}

public static void Login() throws IOException {

String driverPath = "C:\\Program Files\\Parasoft\\SOAtest\\9.9\\eclipse\\plugins\\com.parasoft.xtest.libs.web_9.9.2.20151011\\root\\browsers\\webdriver\\ie\\";

System.setProperty("webdriver.ie.driver", driverPath+"IEDriverServer.exe"); 

WebDriver driver=new InternetExplorerDriver();

driver.get("http://www.google.com");
 close browser

}

}

Comments

Sign In or Register to comment.