When running the new siesta 4.1.0 we are now seeing errors for the screenshots. This was working in 4.0.6. I did log into Browserstack and see that the screenshot was taken though. Wonder if the response has changed as seen by the [object Object]?
Support Forum
Ok, this can be something with the launchers switch to NodeJS. Can't reproduce on my linux box and windows7 vm though, works fine for me:
Are you on Mac? We'll test on Mac on our end, in the meantime, can you please do the following:
Find this code snippet in "bin/siesta-launcher-all.js"
change it to:
And post the output after the change (please also add "--debug" switch on the command line).
nickolay@outpost:~/workspace/JavaScript/siesta$ bin/webdriver lh/siesta/examples/ --include editing --browserstack $BS --browser chrome --cap os='OS X' --verbose
Launching local tunnel to BrowserStack: localhost,80
Launching test suite, OS: MacOS, browser: Chrome 49.0.2623.75
# Simple grid assertions
ok 1 - Waited 1 ms for rows to show for panel with id "grid-1009"
ok 2 - Waited 1000 ms
ok 3 - Name was updated correctly
ok 4 - Successfully taken screenshot: screenshots/editing.png
Similarity: undefined
ok 5 - Successfully taken screenshot: screenshots/editing-first-row.png
Similarity: undefined
ok 6 - Date was updated correctly
[PASS] 2.ui-tests/grid/editing.t.js
# Simple grid assertions
ok 1 - Name was updated correctly
ok 2 - Date was updated correctly
[PASS] 2.ui-tests/grid/editing_with_row_editor.t.js
8 passed, 0 failed assertions took 53.117s to complete
Find this code snippet in "bin/siesta-launcher-all.js"
return page[ command.name ](command).then(function (res) {
return me.finalizeCommand(command, page, res)
}, function (e) {
me.printError(e)
return me.finalizeCommand(command, page, { success : false, error : e + '' })
})
return page[ command.name ](command).then(function (res) {
return me.finalizeCommand(command, page, res)
}, function (e) {
console.log(e)
console.log(e.stack)
return me.finalizeCommand(command, page, { success : false, error : e + '' })
})
Read the API documentation
Here is the output:
IdeaProjects/ui-github/ui-lib/siesta-4.1.0/bin/webdriver https://10.10.XX.XX/siesta-tests.html --include /'session|700_export' --report-format=HTML --browserstack **,**,** --cap browser=chrome --cap os=OSX --cap os_version=Mavericks --report-file=siesta-results-3 --verbose --debug
[DEBUG] --host set to https://*******@hub.browserstack.com/wd/hub
[DEBUG] Dispatcher start
[DEBUG] Runner setup: a Siesta.Launcher.Runner.WebDriverNodeJS.BrowserStack
Launching local tunnel to BrowserStack: 8443
[DEBUG] Output from tunnel software: BrowserStackLocal v5.6
[DEBUG] Output from tunnel software:
[DEBUG] Output from tunnel software: Press Ctrl-C to exit
[DEBUG] Output from tunnel software:
[DEBUG] Output from tunnel software:
[DEBUG] Output from tunnel software: You can now access your local server(s) in our remote browser.
[DEBUG] Dispatcher setup starting
[DEBUG] Trying to create a WebDriver instance for browser: chrome
[DEBUG] WebDriver instantiated successfully
[DEBUG] PageId: 1, method : getConfigInfo starting, args size: 28
[DEBUG] PageId: 1, method : getConfigInfo, took 0.869s, result size : 8358
[DEBUG] Dispatcher setup completed, launching the suite
Launching test suite, OS: MacOS, browser: Chrome 51.0.2704.79
[DEBUG] Launch runner, pagesCount: 1, max : 1, pages left: 1
[DEBUG] PageId: 1, method : launchAutomatedTests starting, args size: 144
[DEBUG] PageId: 1, method : launchAutomatedTests, took 0.148s, result size : 4
[DEBUG] Page polling has started
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 2.193s, result size : 129
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 149.695s, result size : 123
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 5.364s, result size : 1435
# Login Test
ok 1 - Waited 1210 ms for page to load
ok 2 - Waited 152799 ms for page to load
ok 3 - Waited 50 ms
ok 4 - Waiting for Page Load
# Waiting for Ext to be ready
# Waiting for body mask to be visible
# Waiting for body mask to be hidden
ok 5 - Waited 9203 ms for condition to be fulfilled
ok 6 - Waiting for dashboard visible
[PASS] test/session/010_login.t.js
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 142.783s, result size : 126
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 1.277s, result size : 126
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 0.143s, result size : 118
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 0.117s, result size : 118
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 0.118s, result size : 118
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 0.124s, result size : 261
[DEBUG] Received command: {"name":"screenshot","fileName":"chart-topx","totalWidth":1279,"totalHeight":926,"x":70,"y":186,"width":1430,"height":325,"id":1}
[DEBUG] IMGCK command: convert, exitCode: null, args: -extract 1209x325+70+186 /var/folders/sn/1z7mddqd627gldkr6b23qzx80000gp/T/ssi80599sPzBf9ffFyW2.tmp /var/folders/sn/1z7mddqd627gldkr6b23qzx80000gp/T/ssi805993s2OgmVESq95.tmp, output: STDOUT:
STDERR:
dyld: Library not loaded: /opt/local/lib/libfreetype.6.dylib
Referenced from: /Users/steve.schreiner/IdeaProjects/ui-github/ui-lib/siesta-4.1.0/bin//binary/imagemagick/macos/convert
Reason: image not found
{ exitCode: null,
stdout: '',
stderr: 'dyld: Library not loaded: /opt/local/lib/libfreetype.6.dylib\n Referenced from: /Users/steve.schreiner/IdeaProjects/ui-github/ui-lib/siesta-4.1.0/bin//binary/imagemagick/macos/convert\n Reason: image not found\n' }
undefined
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 0.125s, result size : 118
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 0.142s, result size : 118
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 0.118s, result size : 118
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 0.128s, result size : 118
[DEBUG] PageId: 1, method : getAutomationState starting, args size: 2
[DEBUG] PageId: 1, method : getAutomationState, took 0.235s, result size : 11647
# Create basic Report - Test topx charts
# Create a New Report
ok 1 - The reports list is visible
ok 2 - Waited 919 ms for componentQuery: vw-main-tabs reports-tab #savedTemplatesGrid loadmask to return a hidden/missing component
ok 3 - Wait for page to load
ok 4 - Click New Report button on Menu Bar
ok 5 - Wait for page to load
# Add a Top X Bar
ok 6 - Click the +Add button
ok 7 - Click Top X Bar
ok 8 - Click Ok button
# Left Side Metrics
ok 9 - Waited 500 ms
ok 10 - Click Host
ok 11 - Host is selected
# Right Side Metrics
ok 12 - Click Performance
ok 13 - Search for Read IOPS
ok 14 - Waited 1000 ms
ok 15 - Waited 972 ms for observable to fire its "datachanged" event
ok 16 - Click the Select button
ok 17 - Click Ok button
# Verify btn-box at postion [1, 1]
ok 18 - Container visible
ok 19 - Chart at position [1, 1] is visible
ok 20 - Waited 3000 ms
fail 21 - Taking screenshot has failed with error: [object Object]
ok 22 - btn-box contains data
ok 23 - Chart Visible
ok 24 - Click Chart Menu Button
ok 25 - Waited 1000 ms
Seems there's no "libfreetype" library, hm.. But we haven't changed the ImageMagick binaries in 4.1.0, so it should work if it worked before. We'll investigate, sorry for the turbulence.
Read the API documentation
Hello,
I'm allowing myself to reply to this old topic because I'm facing a similar issue ("Taking screenshot has failed with error"). I added the console logs as advised and I'm getting this error:
If that's relevant, I do seem to have this library on my system :
Is there something that I can do ? I'm running Ubuntu 17.10 with Siesta 4.4.2
I'm allowing myself to reply to this old topic because I'm facing a similar issue ("Taking screenshot has failed with error"). I added the console logs as advised and I'm getting this error:
{ exitCode: 127,
stdout: '',
stderr: '/home/.../siesta/bin//binary/imagemagick/linux64/convert: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory\n' }
$ sudo ls -ld $(locate -r libpng.*\.so.*)
lrwxrwxrwx 1 root root 18 jan 6 2016 /snap/core/3604/lib/x86_64-linux-gnu/libpng12.so.0 -> libpng12.so.0.54.0
-rw-r--r-- 1 root root 149904 jan 6 2016 /snap/core/3604/lib/x86_64-linux-gnu/libpng12.so.0.54.0
lrwxrwxrwx 1 root root 35 jan 6 2016 /snap/core/3604/usr/lib/x86_64-linux-gnu/libpng12.so.0 -> /lib/x86_64-linux-gnu/libpng12.so.0
lrwxrwxrwx 1 root root 18 jan 6 2016 /snap/core/3748/lib/x86_64-linux-gnu/libpng12.so.0 -> libpng12.so.0.54.0
-rw-r--r-- 1 root root 149904 jan 6 2016 /snap/core/3748/lib/x86_64-linux-gnu/libpng12.so.0.54.0
lrwxrwxrwx 1 root root 35 jan 6 2016 /snap/core/3748/usr/lib/x86_64-linux-gnu/libpng12.so.0 -> /lib/x86_64-linux-gnu/libpng12.so.0
lrwxrwxrwx 1 root root 19 dec 4 13:32 /usr/lib/x86_64-linux-gnu/libpng16.so.16 -> libpng16.so.16.34.0
-rw-r--r-- 1 root root 202672 sep 29 18:54 /usr/lib/x86_64-linux-gnu/libpng16.so.16.34.0
Bruno
Hi,
Well, to do a quick fix, you can install imageMagick (should be already there) and change this line
in the bin/siesta-launcher-all.js, to
This assumes all imageMagick commands are available in the PATH.
We'll investigate this issue for the next release.
Well, to do a quick fix, you can install imageMagick (should be already there) and change this line
launcher.binDir + '/binary/imagemagick/' + launcher.getPlatformId() + '/' + command + (launcher.isWindows ? '.exe' : ''),
command + (launcher.isWindows ? '.exe' : ''),
We'll investigate this issue for the next release.
Read the API documentation