Reputation: 11202
I'm trying to take a screenshot of form with this code:
require 'watir'
browser = Watir::Browser.new :phantomjs
browser.driver.manage.window.maximize
browser.goto 'https://www.binbank.ru/landing/credits/'
browser.ul(class: 'r-buttons').li(text: '6').click
sleep 2
browser.screenshot.save 'a.png'
And a.png
doesn't capture form. With Firefox as browser form is seen on a.png
. Why is that? How can I interact with this form with PhantomJS?
Upvotes: 0
Views: 581
Reputation: 61922
PhantomJS seems to have problems with SSL on that page. You somehow need to pass --ignore-ssl-errors=true
to the underlying webdriver.
Judging by How to pass browser parameter to Watir this can be done like this:
args = %w{--ignore-ssl-errors=true}
browser = Watir::Browser.new(:phantomjs, :args => args)
Upvotes: 2