Skip to content

Conversation

SrinivasanTarget
Copy link
Member

No description provided.

steps:
- script: |
npm install -g appium@beta
./gradlew clean build xcuiTest -x test -x signArchives
Copy link
Member

Choose a reason for hiding this comment

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

What about using https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/gradle?view=vsts like below?

- task: Gradle@2
  inputs:
    gradleWrapperFile: 'gradlew' 
    tasks: 'clean build' 
    options: 'xcuiTest -x test -x signArchives'

According to https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/macos/macos-Readme.md, we probably can use the gradle task.

Copy link
Member Author

Choose a reason for hiding this comment

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

@KazuCocoa Noted. Neat and clear.

BiPredicate<By, Class<? extends WebElement>> filter,
By by, Class<? extends WebElement> clazz) {
AppiumServiceBuilder builder = new AppiumServiceBuilder()
.withAppiumJS(new File("/usr/local/lib/node_modules/appium/build/lib/main.js"))
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be cross-platform?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry didn't get you?

Copy link
Contributor

Choose a reason for hiding this comment

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

we could find npm root by executing npm root -g. The second part of the path is always constant and can be added using path joining

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup client does the same internally here but not sure why it couldn't find it inside the azure mac host. So i harcoded the same.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would say it would be better to put appium.js path calculation to a separate helper method rather than hardcoding it

Copy link
Member Author

Choose a reason for hiding this comment

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

yup will do that

Copy link
Contributor

Choose a reason for hiding this comment

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

Something like Paths.get(<Path_to_npm_root>, "appium", "build" ,"lib", "main.js")

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm thinking why does client doesn't detect globally installed server path automatically when there is nvm in place in a system... I do remember there are some issues related to it.

@mykola-mokhnach
Copy link
Contributor

mykola-mokhnach commented Nov 20, 2018

I would try to perform

npm config delete prefix 
npm config set prefix $NVM_DIR/versions/node/v6.14.4

in order to fix azure failures if we still want to keep main js path detection helper

@mykola-mokhnach
Copy link
Contributor

update azure configs

add default server path

remove iOS from travis

format as per azure guidelines

format as per azure guidelines

format as per azure guidelines

Add appium server installation

Install specific version of node

Add appium server path

Execute on appropriate environment

Execute on appropriate environment
@mykola-mokhnach
Copy link
Contributor

@SrinivasanTarget Probably, it makes sense to install nvm and node same way it is done on Travis instead of using the built-in one.

@SrinivasanTarget
Copy link
Member Author

@mykola-mokhnach Its fixed now. Can you look into it?

@appium appium deleted a comment Nov 21, 2018
@appium appium deleted a comment Nov 21, 2018
@appium appium deleted a comment Nov 21, 2018
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach left a comment

Choose a reason for hiding this comment

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

I like it much better now. No magic strings anymore.

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