how to create array list to group all these ids

<div class=”favourites_product>
<h2>Favourites</h2>
<p>Quick access to your favourite items.</p>
<div class=”row>
<div id=”favPdtsDataMyHSS>
<div id=”right-angle-drill-110v class=”col-lg-2 col-md-2 col-sm-4 col-xs-6>
<div id=”drill-hammer-36v-battery class=”col-lg-2 col-md-2 col-sm-4 col-xs-6>
<div id=”welding-screen class=”col-lg-2 col-md-2 col-sm-4 col-xs-6>
<div id=”fail-safe-light class=”col-lg-2 col-md-2 col-sm-4 col-xs-6>
<div id=”carpet-cleaner-small class=”col-lg-2 col-md-2 col-sm-4 col-xs-6>
<div id=”magnetic-broacher class=”col-lg-2 col-md-2 col-sm-4 col-xs-6>
<div id=”garden-shredder-electric class=”col-lg-2 col-md-2 col-sm-4 col-xs-6>
<div id=”light-air-pick-anti-vibration class=”col-lg-2 col-md-2 col-sm-4 col-xs-6>
</div>
Add Comment
2 Answer(s)

List<WebElement> list = driver.findElements(By.xpath(“.//h2[contains(text(),’Favourites‘)]//div[contains(@class,’col’)]”));

victor Reviewer Answered on July 21, 2015.

” xpath cannot be resolved or is not a field ” error while adding this code

on July 21, 2015.
RE: how to create array list to group all these ids
on July 21, 2015.
Add Comment

Sorry victor….error due to “”  this cotes…..working fine….Thanks lot….

balaji18s Train Answered on July 21, 2015.

Another one i mentioned inside the screenshot kindly see that…..RE: how to create array list to group all these ids

on July 21, 2015.

You are wellcome
Please mark this question as answered

on July 21, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.