Saswat Saswat - 1 year ago 126
Node.js Question

How to use PhantomJS for opening a sitelink using Selenium Webdriver?

I am trying to use headless Webkit of PhantomJS to open through Selenium Webdriver but when I execute the following code system, some error occurs. Have I missed something?

var webdriver = require('selenium-webdriver');
var By = require('selenium-webdriver').By;
var driver = new webdriver.Builder()
var baseUrl = '';
driver.wait(until.titleIs('webdriver - Google Search'), 1000);

But I am getting a new error:

enter image description here

Answer Source

Require until first:

var until = require('selenium-webdriver').until;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download