Search Posts

Category: selenium-webdriver

Error: Can’t resolve ‘child_process’ Angular-cli

I generated a new application using angular-cli and added few components. I haven’t added any test cases. when I try to run/build the app, I get the following lengthy error message: ERROR in ./node_modules/selenium-webdriver/firefox/binary.js Module not found: Error: Can’t resolve ‘child_process’ in ‘/home/myName/PROJECTS/MEAN/fruit-stall/fruitStall/node_modules/selenium-webdriver/firefox’ resolve ‘child_process’ in ‘/home/myName/PROJECTS/MEAN/fruit-stall/fruitStall/node_modules/selenium-webdriver/firefox’ Parsed request is a module using description file: /home/myName/PROJECTS/MEAN/fruit-stall/fruitStall/node_modules/selenium-webdriver/package.json (relative path: ./firefox) Field ‘browser’ doesn’t contain a valid alias configuration after using description file: /home/myName/PROJECTS/MEAN/fruit-stall/fruitStall/node_modules/selenium-webdriver/package.json (relative path: ./firefox) […]

Protractor hangs at "Selenium standalone server started "

My team recently switched from starting the webdriver-manager manually, to specifying the selenium server in the conf.js file, as specified here: I’m trying to run Protractor with the following conf.js, which takes a few arguments and then returns a configuration object: //create-conf.js ‘use strict’; const path = require(‘path’); const globalData = require(‘./globalData’); module.exports = (confLocation, specs, reportDirName, browserName = ‘chrome’) => { // We want the reports to be saved relative to the config, […]

NgWebDriver waitForAngularRequestsToFinish() is not working

I am trying to implement NgWebDriver using Selenium Java for angular app. As per NgWebDriver documentation we have to only pass new NgWebDriver(driver).waitForAngularRequestsToFinish(); driver instance but when I am trying to implement it , I have to cast argument to JavascriptExecutor otherwise its giving error in the syntax. System.setProperty(“”, “/path/to/chromedriver”); WebDriver d = new ChromeDriver(); NgWebDriver ngdriver = new NgWebDriver((JavascriptExecutor) d); ngdriver.waitForAngularRequestsToFinish(); When I use this code after casting driver instance as than its not […]