Selenium webdriver
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
-
Hi aflorence
SOAtest has integrated, WebDriver-based UI testing which you can include in your testing scenario. This functionality allows you to record scenarios and play them back in your browser without writing code. Please see https://docs.parasoft.com/display/SOA9107/Web+Functional+Testing for details.If you still wish to run a Selenium JUnit from within SOAtest, you can use the Marketplace extension to do this:
https://marketplace.parasoft.com/#query?limit=24&offset=0&keywords=selenium executor0