0

I have little problem with making screenshot of whole page. Using webdriverio code such this (below, with firefox) makes me screenshot of whole page, but not with chrome. Author api says, that i need to use webdrivercss, but i dont know how. Anybody, pls help me. How i can change that code.

var webdriverio = require('webdriverio'); var options = { desiredCapabilities: { browserName: 'chrome' } }; var size; webdriverio .remote(options) .init() .windowHandleMaximize(false) .url('http://webdriver.io/') .saveScreenshot('./chrome.png') .end(); 

For every help, i will be grateful

2
  • did you find any issue in the example from webdrivercss documentation (github.com/webdriverio/webdrivercss) ? Commented Feb 18, 2015 at 16:50
  • I tried, but no. I dont have idea how to encahnce webdriverio to webdrivercss. Commented Feb 18, 2015 at 17:02

1 Answer 1

3

Here is an example:

var webdriverio = require('webdriverio'); var webdrivercss = require('webdrivercss'); var options = { desiredCapabilities: { browserName: 'chrome' } }; var browser = webdriverio.remote(options); webdrivercss.init(browser, { screenshotRoot: './', screenWidth: [1024] }); client.init() .windowHandleMaximize(false) .url('http://webdriver.io/') .webdrivercss('chrome-screenshot', { name:'some_id', elem:'body' }, function(err, res){})) .saveScreenshot('chrome-screenshot') .end(); 

For more information view the webdrivercss github. The documentation is lovely. I've had trouble with screenshots through the chromedriver. They don't render properly... but phantomjs worked well.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.