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

Not able to change video recording parameters on iOS #12463

Closed
Sendery opened this issue Apr 9, 2019 · 6 comments
Closed

Not able to change video recording parameters on iOS #12463

Sendery opened this issue Apr 9, 2019 · 6 comments
Assignees
Labels
Bug a problem that needs fixing XCUITest regarding xcuitest driver

Comments

@Sendery
Copy link

Sendery commented Apr 9, 2019

Videos Settings always the same, dont change

I'm not able to change the video settings for iOS devices using the python function:

driver.start_recording_screen(videoFps="15",quality="high")

the values are examples

The appium server (1.12.1) is processing correctly the arguments and passing them to the wda but the wda is not updating its values.

I had try to connect via a REST client to the wda session in order to POST myself the new settings but the wda always returns a 200 with the same body and without any update.

POST /session/:session_id/appium/settings

Sent case 1

{
"mjpegServerScreenshotQuality":75,
"mjpegServerFramerate":25
}

Sent case 2

{
  "value":{
     "mjpegServerScreenshotQuality":75,
     "mjpegServerFramerate":25
  }
}

Received always

{
  "value": 
  {
    "screenshotQuality":1,
    "elementResponseAttributes":"type,label",
    "shouldUseCompactResponses":true,
    "mjpegServerFramerate":10,"
     mjpegServerScreenshotQuality":25
  },
  "sessionId":"68EF9DF3-FAE8-424C-859D-XXXXXXX6F",
  "status":0
}

Environment

  • Appium version (or git revision) that exhibits the issue: 1.12.1
  • Desktop OS/version used to run Appium: MacOS Mojhave
  • Node.js version (unless using Appium.app|exe): v11.12.0
  • Npm or Yarn package manager: npm 3.10.9
  • Mobile platform/version under test: iOS 12.1.2
  • Real device or emulator/simulator: Real Device
  • Test launched from python 2.7.10

Link to Appium logs

https://gist.github.com/Sendery/98b19a9ae0e60e93e2e4fdf06ee1244d
https://gist.github.com/Sendery/21218e14386493e323b14d29dab7a8c9
https://gist.github.com/Sendery/8829e90f1e477aefa0c00fcb13a5aa73

Code To Reproduce Issue [ Good To Have ]

driver.start_recording_screen(videoFps="15",quality="high")
@KazuCocoa
Copy link
Member

Could you remove WDA once and run Appium 1.12.1 again?
From 1.12.0, mjpegScalingFactor has been introduced. It should be in the returned value if your WDA is over 1.12.0.

$ curl -X GET $JSON_HEADER  http://172.254.99.33:8100/session/424D0713-35A5-4852-A325-65D601DFA7C5/appium/settings
curl: (6) Could not resolve host: application
{
  "value" : {
    "screenshotQuality" : 2,
    "mjpegScalingFactor" : 100,
    "elementResponseAttributes" : "type,label",
    "shouldUseCompactResponses" : true,
    "mjpegServerFramerate" : 10,
    "mjpegServerScreenshotQuality" : 25
  },
  "sessionId" : "424D0713-35A5-4852-A325-65D601DFA7C5",
  "status" : 0
}
$ curl -X GET $JSON_HEADER  http://172.254.99.33:8100/session/424D0713-35A5-4852-A325-65D601DFA7C5/appium/settings
curl: (6) Could not resolve host: application
{
  "value" : {
    "screenshotQuality" : 2,
    "mjpegScalingFactor" : 100,
    "elementResponseAttributes" : "type,label",
    "shouldUseCompactResponses" : true,
    "mjpegServerFramerate" : 1,
    "mjpegServerScreenshotQuality" : 10
  },
  "sessionId" : "424D0713-35A5-4852-A325-65D601DFA7C5",
  "status" : 0
}
$ curl -X GET $JSON_HEADER  http://172.254.99.33:8100/status
curl: (6) Could not resolve host: application
{
  "value" : {
    "state" : "success",
    "os" : {
      "name" : "iOS",
      "version" : "12.2",
      "sdkVersion" : "12.2"
    },
    "ios" : {
      "simulatorVersion" : "12.2",
      "ip" : "172.254.99.33"
    },
    "build" : {
      "upgradedAt" : "1553934402011",
      "time" : "Mar 30 2019 22:45:13",
      "productBundleIdentifier" : "com.kazu.WebDriverRunner"
    }
  },
  "sessionId" : "424D0713-35A5-4852-A325-65D601DFA7C5",
  "status" : 0
}

@KazuCocoa KazuCocoa added iOS related to iOS native driver(s) Needs Info typically non-actionable; needs author to respond labels Apr 9, 2019
@Sendery
Copy link
Author

Sendery commented Apr 10, 2019

I uninstall de appium package and reinstall it, then I recompile the WDA, uninstall the WDA in the device and relaunch the appium. The driver.start_recording_screen() function resend the selected options but the behaviour is the same.

GET http://localhost:8000/status

{
  "value": {
    "state": "success",
    "os": {
      "name": "iOS",
      "version": "12.1.2",
      "sdkVersion": "12.0"
    },
    "ios": {
      "simulatorVersion": "12.1.2",
      "ip": "192.168.1.131"
    },
    "build": {
      "upgradedAt": "1554890714200",
      "time": "Apr 10 2019 12:12:31",
      "productBundleIdentifier": "com.facebook.WebDriverAgentRunner"
    }
  },
  "sessionId": "191B6834-7E7B-47DF-A959-5BCA0A35FAA7",
  "status": 0
}

POST http://localhost:8000/session/00957759-A8C0-4A49-9042-B50CD47F858D/appium/settings

{
  "mjpegServerFramerate": 23,
  "mjpegServerScreenshotQuality": 75
}

RESPONSE

{
  "value": {
    "screenshotQuality": 1,
    "mjpegScalingFactor": 100,
    "elementResponseAttributes": "type,label",
    "shouldUseCompactResponses": true,
    "mjpegServerFramerate": 10,
    "mjpegServerScreenshotQuality": 25
  },
  "sessionId": "00957759-A8C0-4A49-9042-B50CD47F858D",
  "status": 0
}

Now the "mjpegScalingFactor" appear but the options do not change on new settings POST.
Could you point me to a verified WDA repository to test it on my setup?

Appium Video Settings Log 4
Appium Video Settings Log 5

@mykola-mokhnach mykola-mokhnach added Bug a problem that needs fixing XCUITest regarding xcuitest driver and removed Needs Info typically non-actionable; needs author to respond iOS related to iOS native driver(s) labels Apr 10, 2019
@mykola-mokhnach mykola-mokhnach self-assigned this Apr 10, 2019
@mykola-mokhnach
Copy link
Collaborator

I see the problem

@mykola-mokhnach
Copy link
Collaborator

This should be fixed in appium@beta

@Sendery
Copy link
Author

Sendery commented Apr 22, 2019

Thank you very much

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug a problem that needs fixing XCUITest regarding xcuitest driver
Projects
None yet
Development

No branches or pull requests

3 participants