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
33
votes
3 answers

HtmlUnitDriver (HtmlUnit) vs GhostDriver (PhantomJS)?

We are in the middle of choosing our headless browser driver solution that will be some implementation of Selenium WebDriver. There is the GhostDriver, which leverages the PhantomJS in the backend on the one side and HtmlUnitDriver which based on…
Johnny
  • 14,397
  • 15
  • 77
  • 118
27
votes
2 answers

How to disable or change the path of ghostdriver.log?

Question is straightfoward, but some context may help. I'm trying to deploy scrapy while using selenium and phantomjs as downloader. But the problem is that it keeps on saying permission denied when trying to deploy. So I want to change the path of…
Sam Stoelinga
  • 4,881
  • 7
  • 39
  • 54
25
votes
5 answers

How do I set a proxy for phantomjs/ghostdriver in python webdriver?

I'm trying to figure out how to route my requests through an HTTP proxy. I'm initializing webdriver like this: user_agent = 'my user agent 1.0' DesiredCapabilities.PHANTOMJS['phantomjs.page.settings.userAgent'] = user_agent driver =…
erikcw
  • 10,787
  • 15
  • 58
  • 75
17
votes
8 answers

How to Stop the page loading in firefox programmatically?

I am running several tests with WebDriver and Firefox. I'm running into a problem with the following command: WebDriver.get(www.google.com); With this command, WebDriver blocks till the onload event is fired. While this can normally takes seconds,…
ArisRe82
  • 535
  • 1
  • 7
  • 16
17
votes
6 answers

Need to dump entire DOM tree with element id from selenium server

I have been using python selenium for web automation testing. The key part of automation is to find the right element for a user-visible object in a HTML page. The following API will work most of the time, but not all the time. find_element_by_xxx,…
packetie
  • 4,839
  • 8
  • 37
  • 72
17
votes
5 answers

selenium.common.exceptions.WebDriverException: Message: 'Can not connect to GhostDriver'

I'm trying to run PhantomJS from within selenium.webdriver on a Centos server. PhantomJS is in the path and is running properly from terminal. However in the script it appears to be launched, but afterwards cannot be reached on the specified port (I…
symbiotech
  • 1,277
  • 2
  • 17
  • 29
17
votes
2 answers

Custom headers in Phantomjs Selenium WebDriver

According to this it is possible now to modify headers. Atm i need to modify Accept-Language in PhantomJS webdriver. This code doesn't work DesiredCapabilities.PHANTOMJS['phantomjs.page.customHeaders.Accept-Language'] = 'ru-RU' driver =…
Dmitrijs Zubriks
  • 2,696
  • 6
  • 22
  • 33
15
votes
1 answer

Is there a way to view PhantomJS console.log messages via Selenium/GhostDriver?

I'm using the Java bindings of GhostDriver to run Selenium acceptance tests against PhantomJS. If one of the web pages requested by PhantomJS logs to the Javascript console via console.log, is there a way to capture or view those messages? I'm…
kelveden
  • 153
  • 1
  • 2
  • 6
14
votes
3 answers

Java PhantomJSDriver disable all logs in console

I'm developing a small console app using Selenium and I need to turn off all logs from it. I have tried phantomJSDriver.setLogLevel(Level.OFF); but it does not work. I need help. How do I disable all logs in console application that is using…
Alexey Kulikov
  • 1,097
  • 1
  • 14
  • 38
13
votes
2 answers

phantomjs not closing and leaving orphan processes

On PhantomJS 1.9.2, ubuntu 12 LTS and Ghostdirver 1.04 together with selenium 2.35 I get dangling phantomjs processes after my tests. Anyone knows a good way how to fix this? Here is a test program that demonstrates the odd behavior: package…
luksch
  • 11,497
  • 6
  • 38
  • 53
12
votes
1 answer

How do you create a browser profile for Selenium's PhantomJS/GhostDriver?

Here's how you create a Firefox profile: fp = webdriver.FirefoxProfile() fp.set_preference("browser.download.folderList",2) fp.set_preference("browser.download.dir",…
User
  • 23,729
  • 38
  • 124
  • 207
11
votes
1 answer

Ghostdriver 1.2.1 + PhantomJS 2.0 + latest Selenium Can't find variable error in Java

[ERROR - 2016-01-16T02:22:00.898Z] Session [e6651a90-bbf7-11e5-9061-cff578894101] - page.onError - msg: ReferenceError: Can't find variable: data :262 in error [ERROR - 2016-01-16T02:22:00.898Z] Session [e6651a90-bbf7-11e5-9061-cff578894101]…
user3180
  • 1,369
  • 1
  • 21
  • 38
11
votes
1 answer

What is the Difference between Selenium Webdriver and Selenium Ghostdriver?

I want to know difference between Selenium Webdriver and Selenium Ghostdriver. I am also confused as to why selenium Ghostdriver is used? Please give me a brief idea. Thanks in Advance.
Sagar007
  • 848
  • 1
  • 13
  • 33
11
votes
3 answers

Selenium with GhostDriver in Python on Windows

This is embarrassing to ask because it seems like something with so slim chance of error. I wouldn't think this would be difficult, but I've been plugging away at this for almost 3 hours now and it's giving me a headache. I've read several dozen…
User
  • 23,729
  • 38
  • 124
  • 207
10
votes
7 answers

Error registering PhantomJS node in Selenium Grid

I have the following problem I successfully launched Selenium Grid hub with: java -jar selenium-server-standalone-2.53.0.jar -role hub After that I tried to launch PhantomJS node with: phantomjs --webdriver=8090…
1
2 3
11 12