ghostdriver

NightwatchJS .elements returning string and not objects

孤街醉人 提交于 2019-12-04 05:01:53
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(){ console.log("LIST", r); }) }) RETURN LIST { sessionId: 'b273b874-c084-4d17-8bbe-a911a170ef25', status: 0, state: 'success', value: [ { ELEMENT: '6' }, { ELEMENT: '7' }, { ELEMENT: '8' }, { ELEMENT: '9' }, { ELEMENT: '10' }, { ELEMENT: '11' } ], class: 'org.openqa.selenium.remote.Response', hCode: 995684858 } The value should be returning an object of webElements

What is the Difference between Selenium Webdriver and Selenium Ghostdriver? [closed]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 03:23:08
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed 4 years ago . 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. Selenium WebDriver is made up of core Java API and it is also known as Selenium 2 Ghost Driver is a pure JavaScript implementation of the WebDriver Wire Protocol for PhantomJS. It's a

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

穿精又带淫゛_ 提交于 2019-12-04 03:22:44
问题 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 string as JavaScript because unsafe-eval is not an allowed source of script in the following Content Security Policy directive I've got the following command line options set --ignore-ssl-errors=true --web-security=false --ssl-protocol=any Any suggestions?

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

耗尽温柔 提交于 2019-12-04 02:55:48
问题 Here's how you create a Firefox profile: fp = webdriver.FirefoxProfile() fp.set_preference("browser.download.folderList",2) fp.set_preference("browser.download.dir", download_dir) fp.set_preference("browser.download.manager.showWhenStarting",False) fp.set_preference("browser.helperApps.neverAsk.saveToDisk","text/csv") How do you do it with PhantomJS (GhostDriver)? 回答1: The closest you can get with phantomjs is to use the driver capabilities: DesiredCapabilities caps = DesiredCapabilities

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

一曲冷凌霜 提交于 2019-12-03 17:43:29
问题 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 to any particular URL) I get the following error in python: selenium.common.exceptions.WebDriverException: Message: 'Can not connect to GhostDriver' And my ghostdriver.log: PhantomJS is launching GhostDriver... [ERROR - 2014-07-04T17:27:37.519Z]

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

自古美人都是妖i 提交于 2019-12-03 12:53:12
问题 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 button it does nothing. I can retrieve the element, however, looking closer at its properties the 'Selected' property states the following: Error Message => 'Element is not selectable' caused by Request => {"headers":{"Accept":"application/json,

Error registering PhantomJS node in Selenium Grid

孤者浪人 提交于 2019-12-03 07:17:53
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 --webdriver-selenium-grid-hub=http://localhost:4444 but got Error: [INFO - 2016-03-25T13:56:28.397Z] GhostDriver - Main - running on port 8090 [INFO - 2016-03-25T13:56:28.397Z] GhostDriver - Main - registering to Selenium HUB ' http://localhost:4444 ' version: using '127.0.0.1:8090' with org.openqa.grid.selenium.proxy.DefaultRemoteProxy as remote proxy. [ERROR - 2016-03-25T13:56:28

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

谁都会走 提交于 2019-12-03 06:42:25
问题 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 ghostdriver.log or just disable it. Looking at phantomjs -h and ghostdriver github page I couldn't find the answer, my friend google let me down also. $ scrapy deploy Building egg of crawler-1370960743 'build/scripts-2.7' does not exist -- can't

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

♀尐吖头ヾ 提交于 2019-12-02 22:44:34
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 tried 2 different opened ports from my provider 29842 and 60099, they both are not working and neither launching it without a specified port). The error happens here in selenium.webdriver.common.utils : try: socket_ = socket.socket(socket.AF_INET, socket.SOCK_STREAM) socket_.settimeout(1) socket_.connect(("localhost", port)) socket_.close() return

Geb/Selenium tests hang loading new page

允我心安 提交于 2019-12-02 00:57:10
问题 My Selenium tests frequently hang indefinitely on CI, always at an attempt to load a new page in driver.get . I am using PhantomJS 1.9.8. After several rounds of debugging, I think I've traced the problem to the webpage load not completing in PhantomJS. Selenium RemoteWebDriver has sent a request to PhantomJS/GhostDriver and it is waiting on a response. GhostDriver is still accepting requests. I can see what page it's stuck on by hitting curl http://localhost:port/session/:sessionId/url and