ghostdriver

Java PhantomJSDriver disable all logs in console

邮差的信 提交于 2019-12-06 18:01:29
问题 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 Selenium and Phantomjs (GhostDriver)? 回答1: PhantomJSDriverService service = new PhantomJSDriverService.Builder() .usingPhantomJSExecutable(new File(VariableClass.phantomjs_file_path)) .withLogFile(null) .build(); 回答2: This one works for me.

PhantomJS Proxy when using Remote Webdriver?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 14:57:08
I am trying to use selenium in python with PhantomJS. I am running a selenium hub server so am using webdriver.Remote to start a webdriver. The normal way to pass a proxy to PhantomJS is: service_args = [ '--proxy=127.0.0.1:9999', '--proxy-type=socks5', ] browser = webdriver.PhantomJS('../path_to/phantomjs',service_args=service_args) This won't workthough for webdriver.Remote(service_args=service_args) As webdriver.Remote takes only desired_capabilities, not service args, as a parameter. Is there any way to pass a proxy to PhantomJS as a desired_capibility? The typical way one would do so with

Connection refused when phantomjs is run on different machine than selenium hub

拟墨画扇 提交于 2019-12-06 09:38:19
问题 Is it possible to have a selenium hub on one machine and an instance of phantomjs on a different computer that connects to the hub in the same manner as a selenium node? If I start a selenum hub and an instance of phantomjs on the same machine, I can successfully run tests. If I start a selenium hub and start a selenium node a different machine and run a test with firefox, the test is executed successfully. If I start a selenium hub and an instance of phantomjs on a different machine,

Selenium GhostDriver/PhantomJS: File not getting uploaded using sendKeys() / Javascript

醉酒当歌 提交于 2019-12-06 07:23:18
问题 I am running a headless script using PhantomJSDriver/GhostDriver and trying to upload a file on gmail while composing an email. Tool: Selenium with PhantomJS/GhostDriver. The html code is as below: Click the "Browse" button to select a file. Click "Done" when you're finished.</table><table width=100% cellpadding=2 cellspacing=0 border=0> <tr><td align=right>1. </td><td> <input name="file1" type=file size=42><tr><td align=right>2. </td><td> <input name="file2" type=file size=42><tr><td align

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

扶醉桌前 提交于 2019-12-05 18:10:20
问题 Closed . This question needs to be more focused. It is not currently accepting answers. 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. 回答1: Selenium WebDriver is made up of core Java API and it is also known as Selenium 2 Ghost

Java PhantomJSDriver disable all logs in console

和自甴很熟 提交于 2019-12-04 23:32:52
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 Selenium and Phantomjs (GhostDriver)? PhantomJSDriverService service = new PhantomJSDriverService.Builder() .usingPhantomJSExecutable(new File(VariableClass.phantomjs_file_path)) .withLogFile(null) .build(); Hery This one works for me. DesiredCapabilities dcap = new DesiredCapabilities(); String[] phantomArgs = new String[] { "--webdriver-loglevel=NONE" };

Selenium/PhantomJS doesn't work on http://webscraper.io/test-sites/e-commerce/more

被刻印的时光 ゝ 提交于 2019-12-04 21:15:03
I define a WebDriver, get to an example page: http://webscraper.io/test-sites/e-commerce/more/computers/tablets , and click "LoadMore" button for several times. None of them works. This is how I use it (in scala, I can translate and test in Java if you want): val baseCaps = new DesiredCapabilities baseCaps.setCapability(CapabilityType.SUPPORTS_FINDING_BY_CSS, true) baseCaps.setCapability("takesScreenshot", true) baseCaps.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, <my binary path>) val driver = new PhantomJSDriver(baseCaps) driver.get("http://webscraper.io/test

Connection refused when phantomjs is run on different machine than selenium hub

一曲冷凌霜 提交于 2019-12-04 17:52:28
Is it possible to have a selenium hub on one machine and an instance of phantomjs on a different computer that connects to the hub in the same manner as a selenium node? If I start a selenum hub and an instance of phantomjs on the same machine, I can successfully run tests. If I start a selenium hub and start a selenium node a different machine and run a test with firefox, the test is executed successfully. If I start a selenium hub and an instance of phantomjs on a different machine, phantomjs will successfully connect to the hub but refuses the connection when the hub tries to send a test.

Selenium GhostDriver/PhantomJS: File not getting uploaded using sendKeys() / Javascript

有些话、适合烂在心里 提交于 2019-12-04 12:46:00
I am running a headless script using PhantomJSDriver/GhostDriver and trying to upload a file on gmail while composing an email. Tool: Selenium with PhantomJS/GhostDriver. The html code is as below: Click the "Browse" button to select a file. Click "Done" when you're finished.</table><table width=100% cellpadding=2 cellspacing=0 border=0> <tr><td align=right>1. </td><td> <input name="file1" type=file size=42><tr><td align=right>2. </td><td> <input name="file2" type=file size=42><tr><td align=right>3. </td><td> <input name="file3" type=file size=42><tr><td align=right>4. </td><td> <input name=

Error registering PhantomJS node in Selenium Grid

谁都会走 提交于 2019-12-04 11:12:03
问题 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'