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
10
votes
4 answers

How to run ghostdriver with Selenium using java

I want to use phantomJS for some web testing, and I've come across GhostDriver (https://github.com/detro/ghostdriver). I've built it using the instructions in the readme and I can run it on a specified port, but I am not sure how to access the web…
user650309
  • 2,639
  • 7
  • 28
  • 47
9
votes
1 answer

Selenium can't connect to GhostDriver (but only sometimes)

I've setup a simple webscraping script in Python w/ Selenium and PhantomJS. I've got about 200 URLs in total to scrape. The script runs fine at first then after about 20-30 URLs (it can be more/less as it seems random when it fails and isn't related…
user_78361084
  • 3,538
  • 22
  • 85
  • 147
9
votes
1 answer

What's difference between protractor (Selenium webdriver) VS ghostdriver (phantomjs webdriver)?

I would like to make it clear about the difference between protractor VS ghostdriver. With protractor: start selenium web server for testing. multiple browser testing. whenever it start testing, it open the browser. With ghostdriver: start…
Henry Tao
  • 1,104
  • 10
  • 14
9
votes
3 answers

Log HTTP traffic with Webdriver and PhantomJS

How can I log all HTTP requests and responses of a page load over Webdriver with PhantomJS? I am using python and my super simple test script looks like this: from selenium import webdriver driver =…
Thorben
  • 953
  • 13
  • 28
8
votes
1 answer

How to run webpage code with PhantomJS via GhostDriver (selenium)

I looking for ability render pdf with PhantomJS via GhostDriver, not just render pdf. When I use next code, then page normally loaded: from selenium import webdriver driver =…
tbicr
  • 24,790
  • 12
  • 81
  • 106
8
votes
3 answers

PhantomJS and Selenium Webdriver - How to clear session

I'm using Selenium Webdriver (Java) and PhantomJS to test a complex JS driven website. My problem is, that the PhantomJS browser keeps the session between two tests which leads to errors in the test setup. If I run the tests with Firefox everything…
schlingel
  • 8,560
  • 7
  • 34
  • 62
8
votes
1 answer

Element.Click not executed when using PhantomJS selenium webdriver in .Net

I am using our existing tool that works perfectly using the Firefox and Chrome implementations of the Selenium IWebdriver. I am now doing some experimentation using the PhantomJS implementation. So far so good. However, as soon as I want to click a…
8
votes
1 answer

Using Selenium in the background

I'm using Selenium and chrome webdriver but when I run scripts it opens a window. Is there any way that it can access the internet without the window popping up? from selenium import webdriver from selenium.webdriver.common.keys import Keys driver…
Serial
  • 7,925
  • 13
  • 52
  • 71
7
votes
2 answers

NightwatchJS .elements returning string and not objects

I am using nightwatch and trying to iterate through a list of elements. However, when I don't get objects or elements, but I get an array of strings. CODE browser.elements("css selector", ele, function(r){ browser.perform(function(){ …
7
votes
2 answers

How can I handle an alert with GhostDriver via Python?

Problem: The GhostDriver API does not yet support alert handling. There is an acceptable workaround for the time being, which is to inject your own javascript into the page that will handle the alert and store it's text for you. I'm having trouble…
brma
  • 515
  • 5
  • 8
6
votes
3 answers

Phantom JS driver is unable to locate elements sometimes

I am new to PhantomJS and I am trying to run my selenium tests (python) using phantomjs driver but It won't the web elements. Ghostdriver logs: [INFO - 2015-02-27T15:24:40.236Z] GhostDriver - Main - running on port 52653 [INFO -…
rootimbo
  • 337
  • 4
  • 10
6
votes
0 answers

PhantomJS - 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive

I'm trying to change the value of a input with PHP webdriver and PhantomJS. When I run a simple $driver->executeScript("document.getElementById('changeme').value='".$newvalue."' ;", array()); I get the following error Refused to evaluate a…
Mr J
  • 2,655
  • 4
  • 37
  • 58
6
votes
1 answer

Using phantomjs for dynamic content with scrapy and selenium possible race condition

First off, this is a follow up question from here: Change number of running spiders scrapyd I'm used phantomjs and selenium to create a downloader middleware for my scrapy project. It works well and hasn't really slowed things down when I run my…
rocktheartsm4l
  • 2,129
  • 23
  • 38
6
votes
0 answers

PhantomJS throws error while running test using a proxy (JUnit test)

I am running a Java based Selenium test in PhantomJS 1.9.1 & GhostDriver 1.0.4, JDK 1.7 and Win 7 OS. I am also using BrowserMob proxy so that I can capture network traffic to validate some network calls. Given below is how my code looks like. …
manish
  • 152
  • 2
  • 16
5
votes
2 answers

Cannot upload file using PhantomJs (and Selenium WebDriver)

What I'm working with: To start off, my HTML looks the following:
JensOlsen112
  • 1,279
  • 3
  • 20
  • 26
1
2
3
11 12