Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
We are trying to automate Angular JS App using a combination of chromedriver and Javascript. we had problems in identifying the tree view controls in the angular app

Our code looks like this:
C#
var webdriver = require('selenium-webdriver');
var driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()).build();
driver.get('URL');

I have tried using CSS and Xpath but while executing it in the command line it prompts as Xpath as Undefined or CSS as undefined.

Could someone help me out in this regard?
Posted
Updated 8-Sep-16 9:29am
v2
Comments
David_Wimbley 8-Sep-16 17:02pm    
Can you post the HTML example of what it is you are targeting?

1 solution

Hi,

I don't see any code to access the DOM node in the above code. Please share it.

Also, a quick recommendation rather than using selenium webdriver you can look into using protractor for E2E testing.

Protractor - end to end testing for AngularJS[^]

It's the recommended way of testing AngularJS applications using selenium.

Let me know if you've any questions with regards to it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900