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
714 stars 513 forks source link

How can I read mobile capabilites from serenity.conf #3000

Open ikaryan opened 1 year ago

ikaryan commented 1 year ago

I am managing the mobile capabilities from the serenity.conf file of this way

capabilities {
  local {
    appium {
      hub = "http://127.0.0.1:4723/wd/hub"
      deviceName = Nexus_6
      platformVersion = 12
      platformName = Android
      app = "${user.dir}\\src\\test\\resources\\apps\\android\\MiBanco_Dev.apk"
      appPackage = com.popr.android.mibanco.debug
      appActivity = com.popr.android.mibanco.IntroScreen
      deviceOrientation = portrait
      captureScreenshots = true
      autoGrantPermissions = true
      automationName = UiAutomator2
    }
    Android {
      appium {
        deviceOrientation = portrait
        browserName = chrome
        deviceGroup = KOBITON
        deviceName = Galaxy S10
        platformVersion = 5.0.2
        platformName = Android
        app = "kobiton-store:v532107"
        groupId = 3960
        sessionName = Android automation test session
        automationName = UIAutomator2
        deviceGroup = ORGANIZATION
        fullReset = false
        kobitonConcurrence = true
        kobitonServerUrl = "https://epito.perez:d6ec449a-c91d-42bf-a9f6-ff8baef1b2fe@api.kobiton.com/wd/hub"
      }
    },
    iOS {
      deviceOrientation = portrait,
      browserName = chrome,
      deviceGroup = KOBITON,
      deviceName = "*",
      platformVersion = "*",
      platformName = iOS,
      app = "kobiton-store:v511601"
      sessionName = iOS automation test session
      automationName = UIAutomator2
      deviceGroup = ORGANIZATION
      fullReset = false
      kobitonConcurrence = true
      kobitonServerUrl = "https://pepito.perez:d6ec449a-c91d-42bf-a9f6-ff8baef1b2fe@api.kobiton.com/wd/hub"
    }
  }

and the way to identify if it is Local, Android or iOs is from cucumber scenario

`Scenario Outline: Making a new successful transfer Given that requires to access to MI BANCO "os" app

Examples:
  | user    | language | id  | os      |
  | ocuky    | English  | 001 | Android |
  | mainbsm | Spanish  | 002 | iOs|`

But I don't know how to read the cucumber file, taking the value in OS column and based on this value, search it in serenity.conf and load the respective capabilities to open the respective device in the kobiton farm

RemyaAnoop commented 5 months ago

@ikaryan are you using Serenity framework with kobiton? I’m having some issue with hitting the app based on the page object model of Serenity.would like to get your help.

ikaryan commented 5 months ago

Hi Remya, could you please send me the specific issue and the configuration of your serenity.conf? I need more info about issue

From: Remya Nekkuth Melath @.> Sent: Friday, January 26, 2024 1:35 AM To: serenity-bdd/serenity-core @.> Cc: ikaryan @.>; Mention @.> Subject: Re: [serenity-bdd/serenity-core] How can I read mobile capabilites from serenity.conf (Issue #3000)

@ikaryanhttps://github.com/ikaryan are you using Serenity framework with kobiton? I’m having some issue with hitting the app based on the page object model of Serenity.would like to get your help.

— Reply to this email directly, view it on GitHubhttps://github.com/serenity-bdd/serenity-core/issues/3000#issuecomment-1911555012, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHHNV2DITAVESB7GIAX7BZ3YQNE7PAVCNFSM6AAAAAATIBUTH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJRGU2TKMBRGI. You are receiving this because you were mentioned.Message ID: @.**@.>>