Site menu

CodeCook.io

  • Languages
    • C
    • C++
    • CSS
    • Git
    • HTML
    • Java
    • JavaScript
    • jQuery
    • PHP
    • Python
    • Ruby
    • Scala
  • element
  • list
  • select

Protractor - Get specific element from list of Protractor returned elements for locator

Select a specific element from a list of Protractor queried elements. Can be used to supress the warning "... more than one element found for locator ...".

First element
0
3187
  • Share on Facebook
  • Share on Google+
  • Share on Twitter

Using element.all and get

Get all elements by selector and select one by index using get.

element.all({{locator}}).get({{index}})
javascript
  • element.all(locator)
  • element.all(locator).get(index)

Notes

last update: March 12, 2015

Advertisement

This project is hosted on DigitalOcean, try it and support us

Related concept

  • Select element by model

Random task

  • Prepend item to list
  • Remove user from group
  • Get specific element from list of Protractor returned elements for locator
  • Create and resolve promise
  • Random number
  • Blog
  • About
  • License