Reputation: 11
Can any one help me how I can click on button HTML
<div class="row">
<div class="span16">
<div class="pull-right">
<a class="btn primary" href="/v2/admin/user/edit" style="background-color: rgb(54, 67, 149);">Create</a>
</div>
</div>
</div>
I want to click on Create button using web driver JAVA
Upvotes: 1
Views: 831
Reputation: 3350
If you are using selenium, you can use css seletor as jQuery do. Try:
driver.findElement(By.cssSelector("btn:contains('Create')")).click();
Upvotes: 1