Hello All, Below is my script to launch my app. I’m getting Error in the line where im mentioning RemoteWebdriver.
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import com.gargoylesoftware.htmlunit.javascript.host.URL;
public class Allcouplesignup {
WebDriver driver;
@BeforeClass
public void Launch() {
DesiredCapabilities capabilities = new DesiredCapabilities();
// Set version name
capabilities.setCapability(“version”, “4.3”);
// set platform name
capabilities.setCapability(“PlatformName”, “Andriod”);
// set devicename
capabilities.setCapability(“deviceName”, “motorola”);
// set app package name
capabilities.setCapability(“appPackage”, “com.hl.allcouple”);
// set Launcher Activity
capabilities.setCapability(“appActivity”,
“com.hl.allcouple.MainController.SplashActivity”);
driver = new WebDriver (new URL(“http://127.0.0.1’:4723/wd/hub”),capabilities);
//Error is “The Consturctor URL is undefined,Cannot intantiate the Webdriver”
// Please Guide me Show less