protractor expected condition visibilityOf() returns true when element is not displayed

awaken

According to protractor's API for visibiityOf(): Visibility means that the element is not only displayed but also has a height and width that is greater than 0.

I have a search page that returns 50 rows of data.The 50th row is at the bottom of the page out of view and can only be seen if you scroll several times to the bottom. How is it possible that this line is completed immediately when I never scroll down?

browser.wait(EC.visibilityOf(element(by.xpath("//*[@id='search-result']/table/tbody/tr[50]/td[1]")), 20000));

the element does exists, it's just that its not in view. So I don't understand what is going on.

alecxe

This is not actually about the protractor, but more about the Selenium WebDriver and the javascript selenium webdriver bindings (WebDriverJS which is what protractor is wrapping).

Here is the Selenium WebDriver specification describing what WebDriver is taking into account to determine the visibility (it is not trivial):

Here is the javascript selenium bindings "displayedness" implementation:

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Return results in join even when condition is not true

분류에서Dev

LINQ Query returns false when it should be true

분류에서Dev

Why does NVL2 returns NULL when it's not expected?

분류에서Dev

Excel 2013 If Function calculates True when condition is not met

분류에서Dev

If either or both condition true

분류에서Dev

Why does new $class; return null when class_exists($class) returns true?

분류에서Dev

Why is this PHP if condition always true?

분류에서Dev

My sql statement has two parts attached with 'union all'. I want the second part to exceecute only when some condition is true

분류에서Dev

SetShareIntent when a new fragment is displayed

분류에서Dev

Why does my condition always evaluate as true?

분류에서Dev

filter function ng-repeat returning true but 0 results are displayed

분류에서Dev

Array only returns one element

분류에서Dev

PHP returns false but $.post receives as true

분류에서Dev

Logical in my R function always returns "TRUE"

분류에서Dev

DataGridRow.IsEditing never returns true

분류에서Dev

Vlookup with a condition returns #N/A for matched data

분류에서Dev

Protractor "stale element reference: element not attached... How do I fix this?

분류에서Dev

Math equation result loses decimals when displayed

분류에서Dev

Disable background when automatically popup box displayed

분류에서Dev

Angular / Jquery selectors result an error when running Protractor

분류에서Dev

ifelse condition with sampling from specific vector element

분류에서Dev

Groovy collections - Finding an element that matches a condition

분류에서Dev

Unwind array and return the last element matching condition

분류에서Dev

var result = await someFunc() returns an object but I expected list of object

분류에서Dev

Selenium WebDriver- WebElement.FindElements returns more elements then expected

분류에서Dev

LESScss if condition when variable is not empty

분류에서Dev

Python selenium webscraping returns cant find the element

분류에서Dev

jQuery .val() for select element returns text

분류에서Dev

Is there any way to exit for each loop immediately once condition gets true?

Related 관련 기사

  1. 1

    Return results in join even when condition is not true

  2. 2

    LINQ Query returns false when it should be true

  3. 3

    Why does NVL2 returns NULL when it's not expected?

  4. 4

    Excel 2013 If Function calculates True when condition is not met

  5. 5

    If either or both condition true

  6. 6

    Why does new $class; return null when class_exists($class) returns true?

  7. 7

    Why is this PHP if condition always true?

  8. 8

    My sql statement has two parts attached with 'union all'. I want the second part to exceecute only when some condition is true

  9. 9

    SetShareIntent when a new fragment is displayed

  10. 10

    Why does my condition always evaluate as true?

  11. 11

    filter function ng-repeat returning true but 0 results are displayed

  12. 12

    Array only returns one element

  13. 13

    PHP returns false but $.post receives as true

  14. 14

    Logical in my R function always returns "TRUE"

  15. 15

    DataGridRow.IsEditing never returns true

  16. 16

    Vlookup with a condition returns #N/A for matched data

  17. 17

    Protractor "stale element reference: element not attached... How do I fix this?

  18. 18

    Math equation result loses decimals when displayed

  19. 19

    Disable background when automatically popup box displayed

  20. 20

    Angular / Jquery selectors result an error when running Protractor

  21. 21

    ifelse condition with sampling from specific vector element

  22. 22

    Groovy collections - Finding an element that matches a condition

  23. 23

    Unwind array and return the last element matching condition

  24. 24

    var result = await someFunc() returns an object but I expected list of object

  25. 25

    Selenium WebDriver- WebElement.FindElements returns more elements then expected

  26. 26

    LESScss if condition when variable is not empty

  27. 27

    Python selenium webscraping returns cant find the element

  28. 28

    jQuery .val() for select element returns text

  29. 29

    Is there any way to exit for each loop immediately once condition gets true?

뜨겁다태그

보관