ghostdriver

Selenium with GhostDriver in Python on Windows

瘦欲@ 提交于 2019-12-18 15:01:12
问题 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 stackoverflow threads and Google threads. I've installed PhantomJS, added it to my System Variables PATH, and it works properly in the command line. I also installed Selenium earlier with easy_install. The error I get is: __init__ C:\Python27\lib\site

Unable to launch HtmlUnitdriver through Selenium 3.4.0

℡╲_俬逩灬. 提交于 2019-12-18 09:49:39
问题 I am tried to run the HtmlUnitDriver with selenium 3.4 and chrome Version 64.0.3282.119 (Official Build) (32-bit). My code is: package eclipse; import java.io.File; import org.openqa.selenium.By; import org.openqa.selenium.Capabilities; import org.openqa.selenium.UnexpectedAlertBehaviour; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.phantomjs.PhantomJSDriver; import org.openqa.selenium.remote.CapabilityType; import org.openqa.selenium

Trying to run PhantomJS on OpenShift: cannot patch GhostDriver so that it can bind on the server IP address

纵然是瞬间 提交于 2019-12-18 07:09:36
问题 tl;dr How to solve version 'GLIBCXX_3.4.15' not found when I cannot be root on the Linux server? I'm tring to use PhantomJS on OpenShift. As explained in this article, PhantomJS GhostDriver binds on localhost only, while on OpenShift, you cannot bind anything on localhost (you need to specify the machine IP address). Paolo Bernardi (the author of the article) shares a patch that fixes PhantomJS, so that it's possible to bind on an IP address. The problem is that the provided patch does not

Unable to handle alert using phantomJS in Java

孤街浪徒 提交于 2019-12-13 18:08:46
问题 I have a Java code as below and when I am running through PhantomJs getting "Unsupported Command Exception" but it is working fine if I run through firefox and chrome:- Note: With phantomJs we could able to execute till 3rd step in below code.I searched in many blogs but those answers didn't solve my problem. 1. cvvField.sendKeys(cvcData); 2. proceedToPayBtn.click(); 3. Reporter.log("Card details are submitted from payment UI page"); 4. Alert a1=driver.switchTo().alert(); 5. Reporter.log(

How to reduce time in getting URL pages from web using GhostDriver and PhantomJS

雨燕双飞 提交于 2019-12-12 10:15:46
问题 I am doing project in Maven. I try to get pages from URl. Till now I am successful in getting pages from web. But I have two questions, Qustions , Below code takes around 14 seconds to get any two URL pages, how can I reduce this time, Help me in optimizing this. After completing the execution, it does not exits from code. Why ? I ended the code with driver.close() . Then, why, it does not exits successfully. I added snapshots before starting and after completing the process. Please see these

Starting with Phantomjs driver

有些话、适合烂在心里 提交于 2019-12-11 08:48:47
问题 Can anyone suggest me good documentations or steps to start or configure phantomJs driver in java so that i can run my test cases in remote server. 回答1: I run the selenium server in grid mode then connect the phantomjs to it after it is up as it doesn't try to reconnect if it disconnects or isn't fully up ./phantomjs --webdriver=5558 --webdriver-selenium-grid-hub=http://localhost:4444 which will have it listen on port 5558 (for example) but you connect through selenium an it appears as

setting PhantomJSDriverService.PHANTOMJS_GHOSTDRIVER_PATH_PROPERTY

百般思念 提交于 2019-12-11 07:54:20
问题 I have difficulties setting the capability PhantomJSDriverService.PHANTOMJS_GHOSTDRIVER_PATH_PROPERTY in my Java program correctly in order to use the newest version of Ghostdriver from github together with my installed phantomjs version (1.9.1) Here is what I do in my Java program DesiredCapabilities caps = DesiredCapabilities.phantomjs(); caps.setCapability( PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, "/xxx/phantomjs-1.9.1-linux-x86_64/bin/phantomjs" ); caps.setCapability(

Protractor error using PhantomJS

微笑、不失礼 提交于 2019-12-10 21:33:18
问题 I'm using phantomJS and protractor to run an e2e-test on my angular page, generated by gulp (standard angular-generator). When I want to run the second command, I will get the following error: "error while waiting for Protractor to sync with the page: "[ng:test] no injector found for element argument to getTestability..." phantomjs --webdriver=5000 gulp protractor I already looked it up on the internet, also on stackoverflow, but it didn't come to a solution. Everyone says it's because

Change path for the logfile of PhantomJS in java

纵然是瞬间 提交于 2019-12-10 15:14:29
问题 I cannot figure out how I can change path for logfile for PhantomJS. I try with: DesiredCapabilities caps = new DesiredCapabilities(); caps.setJavascriptEnabled(true); caps.setCapability("takesScreenshot", false); caps.setCapability( PhantomJSDriverService.PHANTOMJS_GHOSTDRIVER_CLI_ARGS, new String[] { "--logfile=/home/ant/Document/phantomjsdriver.log" }); caps.setCapability( PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, path); And also with: ArrayList<String> cliArgsCap = new

NightwatchJS .elements returning string and not objects

我怕爱的太早我们不能终老 提交于 2019-12-09 18:00:57
问题 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