8

Phantom.js was abandoned, maintainer recommended to switch to headless Chrome. Headless Chrome does not use CPU resources to repaint the screen, so try how many separate browser sessions you can run on same machine - you might not see the difference between just one headed and headless Chrome, it might be just few percent of the load.


5

I think Peter is right, it does not need the OS to draw the rendered page, might be some what faster. Something you will probably only notice if you run a lot in parallel. But the main point is you can run it on a virtual machine without an Desktop Operating System, saving you lots of memory and thus costs as those VMs are much cheaper per hour. Also if ...


4

One of the disadvantages of using SaaS for regression testing is that you need to allow outside organization access to your pre-production test environment. In most organizations, it has significant part of real production information, which can be security risk. Even if you de-identify user data (scramble addresses, phones, names etc) in pre-production ...


3

I'd take a look at http://caniuse.com/#compare=chrome+51,safari+9.1; that shows what HTML5 constructs Chrome/Blink allow that Safari (and hence webkit) don't. Also, according to http://phantomjs.org/supported-web-standards.html, Support for plugins (such as Flash) was dropped a long time ago. The primary reasons: Pure headless (no X11) makes it ...


2

PhantomJS was abandoned, author recommends to switch to headless Chrome. Parallelization proposed by dzieciou might help, but you will be spending time to improve wrong tool.


2

There are multiple solutions: Use faster locators like id and name. See What makes a good selenium locator? Run your tests in parallel Change part of your tests to REST API tests, component and unit tests If you're using your tests as gateway control, e.g., to decide whether to deploy a build to next environment or production, separate your tests. Use short ...


2

PhantomJS notoriously has a lot of memory issues and will crash after a certain amount of memory use. I have dealt with this issue by splitting up the tests into separate phantom processes rather than all in one.


1

Update to PhantomJS 2.0 and Run using JavascriptExecutor class in selenium: (JavascriptExecutor) driver.executeScript(" var page = this; page.clearMemoryCache(); page.close();"); As mentioned Here.


1

Your example script seems to work fine here. Added some extra loggin: var system = require('system'); var page = require('webpage').create(); console.log(system.args[1]); page.open(system.args[1], function(status) { console.log(status); setTimeout(function(){ console.log(page.content); phantom.exit(); } , 10000); }); Output ...


1

You can try to wait for the searchBar than try to get the cursor(Focus) to desired WebElement using .clear() and then try to send keys. // Initialise instance of WebDriverWait class with 30 seconds of wait time. WebDriverWait wait = new WebDriverWait(driver , 30) wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("input.sbox-ui-input"); ...


1

I was running into the same problem, and I got it to work by adding the cookies with javascript. JavascriptExecutor js = (JavascriptExecutor) getDriver(); js.executeScript("document.cookie = \"cookieName=cookieValue;path=/;domain=www.bbc.com\""); I am running PhantomJS version 2.1.1


Only top voted, non community-wiki answers of a minimum length are eligible