Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

File added #59

wants to merge 2 commits into from

Conversation

SridattaRishi
Copy link
Contributor

No description provided.

Copy link
Collaborator

@shibupanda shibupanda left a 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);
Copy link
Collaborator

@shibupanda shibupanda Feb 23, 2021

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();
Copy link
Collaborator

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();
Copy link
Collaborator

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();
Copy link
Collaborator

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);
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants