I am not able to click on the list item in protractor

rts

Html code

<li name="choice" ng-repeat="choice in candidateStatus" ng-if="choice!=member.candidate_status.status" ng-click="setStatus(choice, member)" class="ng-binding ng-scope">Shortlisted</li>

It is giving the error

ElementNotVisibleError: element not visible

I tried to scroll down the page using this code but it is not working.

browser.executeScript('window.scrollTo(0,250);');

Please please help me

Girish Sortur

Try scrolling the page by getting the location of the element and then wait until scroll happens before clicking on the element using promise that executeScript() function returns. Here's how to do it -

var ele = element(by.repeater('choice in candidateStatus'));
ele.getLocation()
.then(function(loc){
    browser.executeScript('window.scrollTo(0,'+loc.y+');')
    .then(function(){
        ele.click();
    });
});

If there are multiple list elements with ng-repeat tag, then you should probably get the particular list element before clicking it.

Hope this helps.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Why am I able to edit a LINQ list while iterating over it?

From Dev

How to set radio button to checked when i click on list item

From Dev

How to open a new page when I click on each item of a list?

From Dev

not able to click the button in protractor with non-angular site

From Dev

protractor cannot click an element but able to getText

From Dev

Given a list of links, how do I click and validate each one using C# or Protractor, with Selenium?

From Dev

I am not able to click on button in protractor

From Dev

Protractor, when should I use then() after a click()

From Dev

Why am I able to modify a List in a method that's out of scope, without returning it?

From Dev

Fetching List Item Click

From Dev

How am I able to insert an ArrayList<String> into a constructor that accepts List<Integer>?

From Dev

How am I able to insert an ArrayList<String> into a constructor that accepts List<Integer>?

From Dev

I am trying to search for a specific item in linked list

From Dev

I am not able to install svnnotify

From Dev

How to set radio button to checked when i click on list item

From Dev

Single Item Click in a list

From Dev

I am trying to compare an item from a tuple and a list but get an error

From Dev

Given a list of links, how do I click and validate each one using C# or Protractor, with Selenium?

From Dev

i am not able to get the selected item of a dropdown on my next page in angularJS

From Dev

Why am I able to modify a List in a method that's out of scope, without returning it?

From Dev

Fetching List Item Click

From Dev

How can I click the first item in searchview suggestion list in Espresso?

From Dev

Why I am not able to Pop Element from stack using Linked List Implementation?

From Dev

Can't get text I want on list item click

From Dev

I am not able to figure out a bug that is when I try to click on a link on my website it appears the 404

From Dev

protractor click on element on custom dropdown list

From Dev

Protractor: List remains empty even after I am pushing strings

From Dev

List item is not getting focus even though I am using focus()

From Dev

CMS I am able to target the field I want to delete, but when I click on the edit button it does not target it any longer

Related Related

  1. 1

    Why am I able to edit a LINQ list while iterating over it?

  2. 2

    How to set radio button to checked when i click on list item

  3. 3

    How to open a new page when I click on each item of a list?

  4. 4

    not able to click the button in protractor with non-angular site

  5. 5

    protractor cannot click an element but able to getText

  6. 6

    Given a list of links, how do I click and validate each one using C# or Protractor, with Selenium?

  7. 7

    I am not able to click on button in protractor

  8. 8

    Protractor, when should I use then() after a click()

  9. 9

    Why am I able to modify a List in a method that's out of scope, without returning it?

  10. 10

    Fetching List Item Click

  11. 11

    How am I able to insert an ArrayList<String> into a constructor that accepts List<Integer>?

  12. 12

    How am I able to insert an ArrayList<String> into a constructor that accepts List<Integer>?

  13. 13

    I am trying to search for a specific item in linked list

  14. 14

    I am not able to install svnnotify

  15. 15

    How to set radio button to checked when i click on list item

  16. 16

    Single Item Click in a list

  17. 17

    I am trying to compare an item from a tuple and a list but get an error

  18. 18

    Given a list of links, how do I click and validate each one using C# or Protractor, with Selenium?

  19. 19

    i am not able to get the selected item of a dropdown on my next page in angularJS

  20. 20

    Why am I able to modify a List in a method that's out of scope, without returning it?

  21. 21

    Fetching List Item Click

  22. 22

    How can I click the first item in searchview suggestion list in Espresso?

  23. 23

    Why I am not able to Pop Element from stack using Linked List Implementation?

  24. 24

    Can't get text I want on list item click

  25. 25

    I am not able to figure out a bug that is when I try to click on a link on my website it appears the 404

  26. 26

    protractor click on element on custom dropdown list

  27. 27

    Protractor: List remains empty even after I am pushing strings

  28. 28

    List item is not getting focus even though I am using focus()

  29. 29

    CMS I am able to target the field I want to delete, but when I click on the edit button it does not target it any longer

HotTag

Archive