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

Issue serenity-cucumber-starter with serenity core 4.0.15 scaling with lambdatest to test an webpage #137

Open
FerxxoD opened this issue Feb 9, 2024 · 0 comments

Comments

@FerxxoD
Copy link

FerxxoD commented Feb 9, 2024

I've automated an scenario with appium to test a webpage. When I run the test with appium and a virtual managed device of android studio this test works well but scaling to lambdatest it won't work.

This is my serenity.conf to test an android app "With this configuration serenity can connect with lambdatest and run the test successfully"

lambdaAndroid{
        webdriver {
          driver = appium
        }

     appium{
       app="YOUR_APP_URL"
        hub = "[email protected]/wd/hub"
        user="xxxxx"
        accessKey="xxxx"
              w3c=false
              platform="ANDROID"
              platformName="ANDROID"
              deviceName="Pixel 8 Pro"
              platformVersion="14"
              isRealMobile=true
              isAppAutomate=true
              tunnel=true
          autoWebview = true
          automationName="UiAutomator2"
          appProfiling = false
          autoGrantPermissions = true
          autoAcceptAlerts=true
          deviceLog=true
          visual=true
          network=false
          console=true
          build="test"

     }
}

But, when I want to test a web page with chrome java returns the next mistake:
This is the serenity.conf

lambdaAndroid{
        webdriver {
          driver = appium
        }

     appium{
       browserName="chrome"
       noReset=true
        hub = "[email protected]/wd/hub"
        user="xxxxx"
        accessKey="xxxx"
              w3c=false
              platform="ANDROID"
              platformName="ANDROID"
              deviceName="Pixel 8 Pro"
              platformVersion="14"
              isRealMobile=true
              isAppAutomate=true
              tunnel=true
          autoWebview = true
          automationName="UiAutomator2"
          appProfiling = false
          autoGrantPermissions = true
          autoAcceptAlerts=true
          deviceLog=true
          visual=true
          network=false
          console=true
          build="test"

     }
}

This is the mistake:
Caused by: net.thucydides.core.webdriver.DriverConfigurationError: WebDriver was unable to create a new instance of type class io.appium.java_client.AppiumDriver
WebDriver reported the following message: Could not start a new session. Response code 400. Message: platform name is missing in the capabilities

But the capabitily appium:platform is "ANDROID" is in my configuration.

This is the biuld.gradle:
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: "net.serenity-bdd.serenity-gradle-plugin"

sourceCompatibility = 11
targetCompatibility = 11

ext {
serenity_version = '4.0.15'
lambdatest_version = '4.0.48'
junit_platform_launcher_version="1.10.0"
cucumber_junit_platform_engine_version="7.14.0"
junit_platform_suite_version="1.10.0"
junit_jupiter_engine_version="5.9.3"
junit_vintage_engine_version="5.9.3"
logback_classic_version="1.2.10"
assertj_core_version="3.23.1"
}

dependencies {
dependencies {
testImplementation "net.serenity-bdd:serenity-core:${serenity_version}"
testImplementation "net.serenity-bdd:serenity-cucumber:${serenity_version}"
testImplementation "net.serenity-bdd:serenity-screenplay:${serenity_version}"
testImplementation "net.serenity-bdd:serenity-screenplay-webdriver:${serenity_version}"
testImplementation "net.serenity-bdd:serenity-ensure:${serenity_version}"
testImplementation "net.serenity-bdd:serenity-lambdatest:${lambdatest_version}"
// implementation 'com.github.lambdatest:lambdatest-tunnel-binary:2.0.4'
testImplementation "org.junit.platform:junit-platform-launcher:${junit_platform_launcher_version}"
testImplementation "io.cucumber:cucumber-junit-platform-engine:${cucumber_junit_platform_engine_version}"
testImplementation "org.junit.platform:junit-platform-suite:${junit_platform_suite_version}"
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_engine_version}"
testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_engine_version}"
implementation "ch.qos.logback:logback-classic:${logback_classic_version}"
testImplementation "org.assertj:assertj-core:${assertj_core_version}"
testImplementation "io.appium:java-client:9.0.0"
//implementation "com.github.appium:java-client:7.4.1"
}
}

Could you please help me. Thank you

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

1 participant