Questions tagged [ghostdriver]

Ghost Driver is an implementation of the Remote WebDriver Wire protocol, using PhantomJS as its back-end.

Ghost Driver is a pure JavaScript implementation of the WebDriver Wire Protocol for PhantomJS. It is a Remote WebDriver that uses PhantomJS as its back-end. Ghostdriver is the bridge between the Selenium WebDriver with Phantom JS.

Source: github.com/detro/GhostDriver

177 questions
0
votes
2 answers

Getting the count of elements in a pop-up using Selenium and Java

I am writing test cases using Selenium and PhantomJsDriver in Java Selenium - 3.0.1 PhantomJs - 2.1.1 Expected Scenario : Open a pop-up page and find the No of elements inside the pop up page (Actually the items getting displayed inside the pop…
Jay
  • 429
  • 2
  • 8
  • 23
0
votes
0 answers

Selenium doesn't take screenshots of PhantomJS' page state

I'm trying to switch from Chrome to PhanomJS when running Selenium tests. But it fails with PhantomJS for not clear yet reason. First, here's what Selenium Server outputs when I run my first test with PhantomJS: 14:40:49.346 INFO - Executing: [new…
x-yuri
  • 16,722
  • 15
  • 114
  • 161
0
votes
0 answers

Access to PhantomJS "page" object through Selenium WebDriver JavaScriptExecutor

I have a testing setup where I drive PhantomJS through Selenium. Now I'd like to save screen captures as PDF files instead of getting them as plain PNG. PhantomJS could do this out of the box by calling render on the current webpage…
Lucero
  • 59,176
  • 9
  • 122
  • 152
0
votes
0 answers

What could be causing selenium tests to run differently on a different machine?

I'm using selenium and phantomjs to run automated tests. My tests run fine on my local machine. I need to run my tests on a windows server as part of a scheduled task that then emails the results each morning. When my tests are run on the server, a…
WontonJon
  • 413
  • 5
  • 14
0
votes
1 answer

Facing some issues while executing javascript using phantomJS driver with serenity

I am facing the following issue, while executing javascript from the PhantomJS Driver using serenity framework. (PhantomJSDriver) driver).executeScript("document.getElementsById('whereOut')") Error: {"errorMessage":"'undefined' is not a…
Bilbo Baggins
  • 2,899
  • 10
  • 52
  • 77
0
votes
1 answer

PhantomJSDriver take screenshot after X seconds?

I was using PhantomJSDriver to take screenshots of many urls. The problem was that timeout occurs for some of urls. I examined those urls which have failed, and I realize those url takes long time for them to be 'fully' loaded. I can't just extend…
Kevin JJ
  • 333
  • 1
  • 2
  • 9
0
votes
0 answers

Is there any method to create profile for PhantomJS

For firefox using Selenium, we can create profiles similar to this: How to create profile in Firefox using Selenium WebDriver https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles Also we have the list of…
0
votes
0 answers

PhantomJS Hide & Seek

I came across the following ways PhantomJS can open a website without being detected as PhantomJS if the website only tests for these ways separately: Can fool Website “User-agent” via HTTP Yes Client-side…
TechyHarry
  • 301
  • 2
  • 8
  • 25
0
votes
1 answer

geb.Browser is trying to use FirefoxDriver instead of PhatomJSDriver

For some reason, my code tries to use the firefox browser when it should be using phantomjs. My groovy code looks like this: import geb.Browser ... env = System.getenv() def username = env.username def password = env.password def gateway =…
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
0
votes
2 answers

Scraping our site to check for Javascript errors

I am kind of desperate here. For a couple of days I have been trying to create a web scraper that can go through our website and check for Javascript errors. The big problem is that I only know Java and it seems that GhostDriver isn't maintained…
Homewrecker
  • 1,076
  • 1
  • 15
  • 38
0
votes
1 answer

PhantomJS not loading CSS styles

Hi I'm using PhantomJS v 2.1.1 via WebDriver in my Django app tests. But from screenshot in one problematic test it isn't loading CSS. I need to test that there are some buttons in Bootrap modal but it's not displayed at all. Browser init in test…
Matěj Mihal
  • 73
  • 1
  • 10
0
votes
0 answers

"TypeError: undefined is not a constructor" error in Python Webdriver ghostdriver.log

I start WebDriver with PhantomJS: def start_webdriver(): try: driver = webdriver.PhantomJS('./phantomjs', desired_capabilities=dcap) return driver except WebDriverException, e: print "Unable to load profile,…
Pyderman
  • 14,809
  • 13
  • 61
  • 106
0
votes
3 answers

How to pass arguments to a PhantomJS script from Selenium/Ghostdriver

I what to execute a phantomJS script which download a webpage (args[1]) and save the result html into a file (args[2]) as follows: var system = require('system'); var page = require('webpage').create(); var fs = require('fs'); // Set the url…
0
votes
0 answers

Fix exception and rerun function

How can we fix an exception and rerun the exact function that threw the exception? For example, in Selenium if there is a inline popup window that appears randomly on the website, we may get a NoSuchElement exception. I want to catch that exception,…
user3180
  • 1,369
  • 1
  • 21
  • 38
0
votes
0 answers

Opening website with PhantomJS results in empty page

Here's how I try to load web page content: System.setProperty("phantomjs.binary.path", PhantomJsDowloader.getPhantomJsPath()); WebDriver driver = new PhantomJSDriver(); driver.get("https://www.google.ru/?gws_rd=ssl"); …
Aeteros
  • 643
  • 1
  • 10
  • 24