serenity-bdd / serenity-core

Serenity BDD is a test automation library designed to make writing automated acceptance tests easier, and more fun.
http://serenity-bdd.info
Other
718 stars 515 forks source link

Serenity.conf Saucelabs appium syntax #2903

Open mpancratovv opened 2 years ago

mpancratovv commented 2 years ago

Trying to run a test with a specific android capabilities defining them in serenity.conf, but Saucelabs doesn't recognize them: "No browserName or device specified in session request"

Previously I was using serenity.properties and it worked good for mobile devices as well:

webdriver.driver=appium
appium.appiumVersion=1.18.1
appium.deviceName=Android GoogleAPI Emulator
appium.deviceOrientation=portrait
appium.browserName=Chrome
appium.platformVersion=11.0
appium.platformName=Android

Since I moved to serenity.conf, the sample I used worked good only for browsers e.g. Chrome, Firefox, Edge on desktop platforms: https://github.com/serenity-bdd/serenity-core/blob/main/serenity-smoketests/src/test/resources/serenity.conf

The issue is related only to mobile devices. It looks like there is some syntax issue, but I was not able to find a way to define device in serenity.conf file in a correct way.

Currently my serenity.conf file looks this way:

environment = android

environments {

    android {
        sauce.active = true
        webdriver {
            driver = remote
            remote.url = "#{sauce.url}"
            capabilities {
                platformName = "Android"
                device = "Android GoogleAPI Emulator"
                platformVersion = "11.0"
                browserName = "Chrome"
            }
        }
    }

    all {
        sauce.username = ""
        sauce.key = ""
        sauce.url = ""
    }
}
Ramesh1103 commented 1 year ago

hi @mpancratovv, did you got to know how to fix this issue and setting mobile automation properties ?

lunayui commented 6 months ago

Any updates about this issue?