Skip to content

elementIdText API breaks in Version 2.x.x while selecting a value from list of dropdown values #3430

Discussion options

You must be logged in to vote

@suraj007118 you can try using findElements instead of elements command and then options.value[i].getId() will work fine. Here is an example test:

  it('find elements', function() {
    browser.navigateTo('https://nightwatchjs.org')
      .findElements('css selector', 'div', result => {
        result.value.forEach(v => console.log(v.getId()));
      });
  });

Replies: 6 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@suraj007118
Comment options

Answer selected by gravityvi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3410 on October 13, 2022 12:14.