marathonv5
marathonv5 copied to clipboard
Hand shaking is not happening server client although FX based application is launched
Please help in below code trying to enter text in userid field.
public class Demo2stack {
private RemoteWebDriver driver;
@Test
public void createJavaProfile() throws MalformedURLException {
// Method 1
JavaProfile profile1 = new JavaProfile(LaunchMode.JAVA_COMMAND_LINE);
profile1.setLaunchType(LaunchType.FX_APPLICATION);
profile1.setWorkingDirectory("D:\\RegClientAutomation\\reg-client");
profile1.setJavaCommand("D:\\RegClientAutomation\\reg-client\\jre\\jre\\bin\\java");
profile1.addClassPath("D:\\RegClientAutomation\\registration-client-1.1.3-jar-with-dependencies.jar");
profile1.setMainClass("io.mosip.registration.controller.Initialization");
System.out.println("36");
DesiredCapabilities dp=new DesiredCapabilities("javafx", "",Platform.ANY);
dp.setBrowserName("javafx");
int p=profile1.getPort();
System.out.println("Port"+p);
try
{
driver = new JavaDriver(profile1);
}
catch(Exception e)
{
e.printStackTrace();
}
System.out.println("39");
System.out.println("Window Title ::: " + driver.getTitle());
WebElement userId =driver.findElement(By.id("userId"));
userId.sendKeys("110123");
}
@AfterMethod
@AfterTest
public void tearDown() {
if (driver != null)
driver.quit();
}
}