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

Cannot see the recorded video file #8

Closed
xyngfei opened this issue May 14, 2019 · 8 comments
Closed

Cannot see the recorded video file #8

xyngfei opened this issue May 14, 2019 · 8 comments
Labels
question Further information is requested

Comments

@xyngfei
Copy link

xyngfei commented May 14, 2019

Describe the bug
Does it support screenshot on mobile native APP with jasmine framework?

I have encountered this issue when the test end

[0515444646413736 LINUX 7.0 #0-0] TypeError: Cannot read property 'toUpperCase' of undefined
[0515444646413736 LINUX 7.0 #0-0] at
[0515444646413736 LINUX 7.0 #0-0] at Video.emit (events.js:182:13)
[0515444646413736 LINUX 7.0 #0-0] at Video.EventEmitter.emit (domain.js:441:20)
[0515444646413736 LINUX 7.0 #0-0] at
[0515444646413736 LINUX 7.0 #0-0] at

Log

`Using reporter config:[
"spec",
[
null,
{
"saveAllVideos": true,
"videoSlowdownMultiplier": 3,
"videoRenderTimeout": 5
}
],
[
"allure",
{
"outputDir": "./wdio/__logs/allure-result",
"disableWebdriverStepsReporting": true,
"disableWebdriverScreenshotsReporting": true
}
]
]

Using config:{
"debugMode": true,
"logLevel": "info",
"videoRenderTimeout": 5,
"outputDir": "results",
"allureOutputDir": "./wdio/__logs",
"rawPath": "rawSeleniumVideoGrabs",
"usingAllure": "allure",
"saveAllVideos": true,
"videoSlowdownMultiplier": 3,
"excludedActions": [],
"jsonWireActions": [
"url",
"forward",
"back",
"refresh",
"execute",
"size",
"position",
"maximize",
"click",
"submit",
"value",
"keys",
"clear",
"selected",
"enabled",
"displayed",
"orientation",
"alert_text",
"accept_alert",
"dismiss_alert",
"moveto",
"buttondown",
"buttonup",
"doubleclick",
"down",
"up",
"move",
"scroll",
"doubleclick",
"longclick",
"flick",
"location"
]
}

--- New suite: Validate Consent form in TO-DO list, ---

--- New test: should be able to tap on existing consent form successfully ---
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element/1/displayed => [displayed]
Incomming command: /session/:sessionId/element/1/click => [click]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element/2/displayed => [displayed]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/elements => [elements]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element/5/click => [click]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/elements => [elements]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element/6/displayed => [displayed]
Incomming command: /session/:sessionId/element => [element]
Incomming command: /session/:sessionId/element/7/click => [click]
Incomming command: /session/:sessionId/log/types => [types]
Incomming command: /session/:sessionId/log => [log]
Incomming command: /session/:sessionId/log => [log]
Incomming command: /session/:sessionId => [:sessionId]

--- Awaiting videos ---
Max waiting time: 5s

--- Videos are done ---

Generated:[]

--- Patching allure report ---

Done!

`

Expected behavior
I should see the video in the allure result folder

Environment (please complete the following information):

  • wdio-video-reporter version: 1.3.3
  • WebdriverIO version: 5.8.3
  • Mode: WDIO Testrunner
  • If WDIO Testrunner, running sync/async: sync
  • Node.js version: v11.3.0
  • NPM version: 6.7.0
  • Browser name and version: NA
  • Platform name and version: Samsung Galaxy Note5 (Appium)
@presidenten presidenten added the question Further information is requested label May 14, 2019
@presidenten
Copy link
Collaborator

Would you mind forking https://github.com/presidenten/wdio-template and replicating the issue in the test-file so that I may test on a android device here to try to isolate the issue?

All I can see now is that the selenium driver does not seem to take any screenshots after user actions, but I have no clue as to why that is. Having the test case here or a similiar case that is not working would make it easier.

@presidenten
Copy link
Collaborator

Could you update to v1.4.0 and see if it fixes your problem?

If it doesnt fix it, Would you mind forking https://github.com/presidenten/wdio-template and replicating the issue in the test-file so that I may test on a android device here to try to isolate the issue?

@xyngfei
Copy link
Author

xyngfei commented May 27, 2019

@presidenten apologize for the late reply.
Not sure why I cannot use the v4 to do the npm i
I hv reported this issue to the auther
amiya-pattnaik/webdriverIO-with-cucumberBDD#11

Even I tried with another boilerplate project, I am still encountering a similar issue.
https://github.com/michaelguild13/Selenium-WebdriverIO-Mocha-Chai-Boilerplate

Give me some time, I will provide more detail to you.

@xyngfei
Copy link
Author

xyngfei commented May 27, 2019

@presidenten

Please refer to this fork.
https://github.com/xyngfei/wdio-template

FYI, I didn't encounter any issue to execute wdio-template repo and I can see the video from the allure report.

@presidenten
Copy link
Collaborator

presidenten commented May 27, 2019

The problem is that those two other boilerplates are using wdio v4 and Im using some hooks and methods that are only present in wdio v5.

If you upgrade them to wdio v5 Im sure it will work. Wdio v5 is scoped under @wdio/
For example:

    "@wdio/cli": "^5.9.1",
    "@wdio/interface": "^5.7.8",
    "@wdio/jasmine-framework": "^5.9.1",
    "@wdio/local-runner": "^5.9.1",
    "@wdio/selenium-standalone-service": "^5.8.4",
    "@wdio/spec-reporter": "^5.8.0",
    "@wdio/sync": "^5.9.1",

To upgrade you need to remove npm package webdriverio and all wdio-*. Then add the @wdio/* packages that you need.

Edit: I forgot to mention that the frames for the videos are grabbed after user actions.
These are default JSON-wire commands that leads to a frame grab:
https://github.com/presidenten/wdio-video-reporter/blob/002b91c033d67a53d0e975f785b0813a865b0e37/src/config.js#L33
And here is info on how to add more commands:
https://github.com/presidenten/wdio-video-reporter/blob/master/README.md#advanced-configuration-parameters

Do you feel this issue is resolved, so I can close it?

@xyngfei
Copy link
Author

xyngfei commented May 28, 2019

Under Appium setup guide section, where do I find wdio-config.json file?

If I didn't specify the browserName under the capabilities, I suspect will throw the exception above.

Besides, possible to add a sample how can I capture the appium native APP test?

@presidenten
Copy link
Collaborator

I have planned that I wil write an extended tutorial on how to get appium up and running.
Until then, with wdio-config.json I mean this file: https://github.com/presidenten/wdio-template/blob/master/wdio.conf.js
If you dont scope appium-specific capabilities you will get exception because v5 being full w3c compliance. So in these files you need to write appium:deviceType instead of just deviceType.

When I write appium configuration I mean a json-file that I use to start appium for the device. Appium is does not need the scoping for itself.

@xyngfei
Copy link
Author

xyngfei commented May 28, 2019

Thanks for your suggestion. I am really keen to wait for the Appium example soon.
FYI, I just added 2 of the lines below, I can see the video from the allure report.

capabilities: [ { . . . deviceType: "phone", browserName: '', . . . }, ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants