6

I have recently installed selenium-webdriver javascript(node) client 3.6.0

steps are follows;

# npm install webdriver
# npm install selenium-webdriver
# npm install chromedriver

install them into my project folder

then make a js file into that name "library.js"

var webdriver = require('selenium-webdriver');
var driver = new webdriver.Builder().forBrowser('chrome').build();
By = webdriver.By;
until = webdriver.until;


driver.get('http://www.google.co.in');

enter image description here

This is showing async execute(command) error at require('selenium-webdriver')

node version V7.1.0. npm version 3.10.9 chrome Version - ChromeDriver 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881)

Help my in this how to run this

3
  • You have comma after webdriver.By. Commented Jan 31, 2018 at 13:33
  • www.google.co.in is not a valid url. The scheme is missing. Commented Jan 31, 2018 at 15:30
  • first typing node at console , then at node console writhing var webdriver = require('selenium-webdriver'); giving error. Remove 'Comma' and add semicolon but still same Commented Feb 1, 2018 at 5:46

2 Answers 2

8

I ran into this issue. Run node -v if your version is under 8 it doesn't have the ability to handle the async command. You'll have to update Node.

Sign up to request clarification or add additional context in comments.

Comments

5

The same issue, fix by upgrade Node to v8.9.4 as Faraji said above.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.