In below code, I would like to assign ‘driver’ object to MobileBuiltInKeywords reference variable. So that I should be able to perform Mobile keyword on the test.
@Keyword
public static void connectBCloud(String capp, String androidcloudurl ) throws MalformedURLException, InterruptedException {
caps = new DesiredCapabilities();
//caps.setCapability("app", appid);
caps.setCapability("app", capp);
caps.setCapability("device", "Samsung Galaxy S8 Plus");
caps.setCapability("browserstack.local", "true");
driver = new AndroidDriver(new URL(androidcloudurl), caps);
}
Try to do as below,
driver = new AndroidDriver(new URL(androidcloudurl), caps);
// Trying to do like this but not sure this is the right way of doing it
Mobile = driver;
Please suggest me what is the best way… Thanks