Tuesday 9 May 2017

Web driver click on second element in the list in nodejs

menuList = findElements(By.cssSelector(".menuList"));

List < WebElement > menuButtons = menuList.findElements(By.cssSelector("ul>li>a")); menuButtons.get(1).click();

I want to do this thing in nodeJs, what should I write ?

The HTML Hierarchy is as follows -

List
   - List 1.1
        -- List 1.1 a
        -- List 1.1 b
   - List 1.2
        -- List 1.2 a
        -- List 1.2 b

So, I want to click on List 1.2 a in nodeJs.



via Monika Gambhir

No comments:

Post a Comment