Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get value of DIV - WebDriver (Selenium)

I want to get the value of div using webdriver and not Selenium For example :

<div class="headerbande">BIENVENUE</div>

Is there any method in webdriver to get "BIENVENUE" using class name ? Thanks in advance.

like image 456
Anass Avatar asked Jun 22 '12 06:06

Anass


1 Answers

With java you would write:

WebElement element = webdriver.findElement(By.className("headerbande"));

Take a look at Introducing the Selenium-WebDriver API by Example for examples in other languages.

like image 87
VolkerK Avatar answered Sep 20 '22 13:09

VolkerK