Is it possible to take a screenshot of the whole page with Selenium/Capybara?

In case anyone washed up this shore looking for how to do this with Poltergeist you just need to pass the full argument: page.save_screenshot(‘screen.png’, full: true) # If providing a custom file name. page.save_screenshot(full: true) # Capybara sets a name based on timestamp. page.save_and_open_screenshot(‘screen.png’, full: true) # Same as save_screenshot. page.save_and_open_screenshot(full: true) # Same as … Read more

webdriver classname with space using java

Instead of class name you can use a css selector. You don’t mention the tagname for the class ‘current time’. I am assuming it to be input, so your css selector work be, WebElement element = driver.findElement(By.cssSelector(“input[class=”current time”]”)); element.click(); Edit#1 Based on html provided, Looking at the html in your comment, it seems you have … Read more

ERROR:ssl_client_socket_openssl.cc(1158)] handshake failed with ChromeDriver Chrome browser and Selenium

You get this error when the browser asks you to accept the certificate from a website. You can set to ignore these errors by default in order avoid these errors. For Chrome, you need to add –ignore-certificate-errors and –ignore-ssl-errors ChromeOptions() argument: options = webdriver.ChromeOptions() options.add_argument(‘–ignore-certificate-errors’) options.add_argument(‘–ignore-ssl-errors’) driver = webdriver.Chrome(chrome_options=options) For the Firefox, you need to … Read more

Open tor browser with selenium

Don’t use the TBB, just set the correct proxy settings in whatever browser you’re using. In FF for example, like this: #set some privacy settings ff_prof.set_preference( “places.history.enabled”, False ) ff_prof.set_preference( “privacy.clearOnShutdown.offlineApps”, True ) ff_prof.set_preference( “privacy.clearOnShutdown.passwords”, True ) ff_prof.set_preference( “privacy.clearOnShutdown.siteSettings”, True ) ff_prof.set_preference( “privacy.sanitize.sanitizeOnShutdown”, True ) ff_prof.set_preference( “signon.rememberSignons”, False ) ff_prof.set_preference( “network.cookie.lifetimePolicy”, 2 ) ff_prof.set_preference( “network.dns.disablePrefetch”, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)