Skip to content

use options class instead deprecated DesiredCapabilities #24

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

Closed
wants to merge 3 commits into from

Conversation

avinash-bharti
Copy link
Collaborator

JIRA: https://browserstack.atlassian.net/browse/ASI-4226
This PR:

  • Uses latest python appium client
  • Replace deprecated DesiredCapabilities with Options class
  • Remove unnecessary local setup instruction

@avinash-bharti avinash-bharti marked this pull request as ready for review August 24, 2022 11:26
throws MalformedURLException, InterruptedException {
DesiredCapabilities caps = new DesiredCapabilities();
throws MalformedURLException, InterruptedException {
UiAutomator2Options options = new UiAutomator2Options();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Mutuable Caps?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been discussed with product team and @francisf and we decided to use Options.

Mutuable caps are not needed here, for android and ios separate folders are present because a single script cannot be used for both ios and android automation.

throws MalformedURLException, InterruptedException {
DesiredCapabilities caps = new DesiredCapabilities();
throws MalformedURLException, InterruptedException {
XCUITestOptions options = new XCUITestOptions();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Mutuable Caps?

caps.setCapability("platformVersion", "9.0");
options.setCapability("deviceName", "Google Pixel 3");
options.setCapability("platformName", "android");
options.setCapability("platformVersion", "9.0");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is non-w3c compliant and it must go inside bStackOptions ?
https://www.w3.org/TR/webdriver1/#capabilities

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also app cap is not complaint.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Appium these caps are general capabilities and not specific to Browserstack, please ref here

capabilities.setCapability("platformName", "android");
capabilities.setCapability("platformVersion", "9.0");
options.setCapability("deviceName", "Google Pixel 3");
options.setCapability("platformName", "android");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above comment applies here too.

@alliv8
Copy link

alliv8 commented Aug 29, 2022

Folder structure and readme suggestions:

Option 1:

Let's rename folders to:
appium_client_v7_MJSONWP
appium_client_v8_W3C

Option 2:
We keep appium client v8 w3c as master and create a new branch for MJSONWP and reference it in the readme.

@karanshah-browserstack
Copy link
Collaborator

karanshah-browserstack commented Sep 2, 2022

Please close this pr as we are doing it as part of #25

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.

3 participants