Skip to content
Advertisement

Difficulty with a locator(using java for selenium)

Complete newbie here…started trying to learn selenium with java this month. Having troubles locating one button, because it seems to lack name id, link and its class is weird looking. Can someone help me write a locator for it? Its an accept cookies button.

JavaScript

Advertisement

Answer

You can use either of the xpath option to identify the element.

JavaScript

OR

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement