I am new to Selenium 2.0 and WebDriver and any help and suggestions on how I can resolve my issue are welcome.
The html code that I am looking at is:
<html>
<head>
<body class="index">
<div class="container">
<div class="masthead">
<div class="status-bar">
<div class="app-vpn-selector-container">
<div id="page_tabs" class="tabs">
<div class="tab-group monitoring">
<div class="tab-group-name"> Monitoring </div>
<div class="tab active"> Status </div>
<div class="tab"> Events </div>
<div class="tab"> Reports </div>
<div class="tab"> Statistics </div>
</div>
<div class="tab-group configuration">
</div>
<div id="page_content" class="tab_content">
</div>
</body>
</html>
The task I have is to store all the names of the tabs: Status, Events, Reports, Statistics and assert that the values exist.
List<WebElement> allTabs = webdriver1.findElements(By.xpath("//div[@id='page_tabs']/div/div"));
will get me to the element but I cannot read the attribute values. Could someone let me know how to resolve it. I have spent a lot of time reading information online, but could not find a solution. Thanks in advance