-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File added #59
base: master
Are you sure you want to change the base?
File added #59
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the Java coding standard
-> Class name should starts from Caps
|
||
ob.capability=capabilities; | ||
ob.driver= new AndroidDriver(new URL("https://device.pcloudy.com/appiumcloud/wd/hub"), ob.capability); | ||
driverAppium.add(ob.driver); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't add driver in list it is very bad programming because it may changed or in future different driver can come into picture.
public void Test() throws IOException, InterruptedException { | ||
|
||
System.out.println(driverAppium.size()); | ||
driverAppium.get(0).findElement(By.xpath("//android.widget.Button[@resource-id='com.pcloudy.appiumdemo:id/accept']")).click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use index to get driver it is very bad programming because it may changed or in future different driver can come into picture.
@AfterMethod | ||
public void endTest() throws IOException { | ||
|
||
driverAppium.get(0).quit(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use index to get driver it is very bad programming because it may changed or in future different driver can come into picture.
|
||
AppiumDriverLocalService service; | ||
public AppiumDriver<WebElement> driver; | ||
driverIntialize ob=new driverIntialize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClassName should start from caps. And please work on naming convention.
@Test | ||
public void Test() throws IOException, InterruptedException { | ||
|
||
System.out.println(driverAppium.size()); | ||
driverAppium.get(0).findElement(By.xpath("//android.widget.Button[@resource-id='com.pcloudy.appiumdemo:id/accept']")).click(); | ||
Hostdriver=driverlistAppium.get(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SridattaRishi still the list has been used. Please access the driver through some unique value like deviceName and all
No description provided.