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

Is there a way we can set appium capabilities for iOS and android in single file #3378

Closed
RemyaAnoop opened this issue Jan 20, 2024 · 2 comments

Comments

@RemyaAnoop
Copy link

What happened?

I’m trying to update or modify the appium configuration for mobile testing.
till now we were passing device details in serenity.properties file and while executing we will enable the specific device for android or iOS .

in order to reduce the manual intervention, I’m right now setting the device run time and need to fetch rest of the capabilities from conf file.

Tried something like this:

environments{
Develop{
Appium {
Capabilities {
PlatformName =“android”
“Kobition:Options”{
Deviceorientation=“landscape”
workApp=“MyApp”
……
}
}
}
Appium {
Capabilities {
PlatformName =“ios”
“Kobition:Options”{
Deviceorientation=“portrait”
Bundleid =“xxxxx”
……
}
}
}
}

}

passed hub in serenity.properties along with browser name =chrome

Run config was
-Denvironment=Develop -Dwebdriver.driver=appium -Dappium.platformName=android -Dappium.deviceName=“google pixel 5”
-Dtags=test

I was able to retrieve the capabilities based on device type but something got messed up and now I’m getting capabilities of both iOS and android as output of apply() method of the interface BefireAWebdriverScenario.

How can I set the capabilities in a nested way so that I can set it based on the platform value and need not change manually ???

What did you expect to happen?

Return the capabilities block of android when platform=android

right now it is returning both iOS and android capabilities in response

Serenity BDD version

3.7.1

JDK version

17

Execution environment

Develop , uat

How to reproduce the bug.

Set capabilities in the way provided for appium and execute any mobile test

How can we make it happen?

Add it to the Serenity BDD backlog and wait for a volunteer to pick it up

@RemyaAnoop
Copy link
Author

Figured out this issue. Closing the ticket

@dragos-panzaru-md
Copy link

@RemyaAnoop what was the solution for your problem?

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

No branches or pull requests

2 participants