-1

I identified one unique webelement as:

ng-click="navigateToNewCustomer('New Customer')"

How can I write xpath for this? When i wrote xpath it throws error since I am using double quotes.

//*[@ng-click="navigateToNewCustomer('New Customer')"].click();
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Arun Chettur
  • 43
  • 2
  • 10
  • Please add HTML snip for WebElement you identified and error traceback with your code trials – Dev Jan 23 '19 at 08:08

1 Answers1

3

You can escape double quotes with a backslash:
//*[@ng-click=\"navigateToNewCustomer('New Customer')\"].click();

Caders117
  • 319
  • 3
  • 18