Forum Discussion

kaiiii's avatar
kaiiii
Regular Contributor
2 years ago

How to check a page have scroll bar or not

1) I need to check if a web page have a scroll bar or not. There is no specific locator value available for the scroll bar. It appears and disappears as per the list size on the page.

 

2) Also please tell me what is the difference between obj.scrollIntoView(true) and obj.scrollIntoView(false) ?

  • jkrolczy's avatar
    jkrolczy
    Regular Contributor

    For a web page, you seem to be able to determine by the number of items listed whether a scroll bar should appear or not.

    Can you determine from ObjectSpy if the scrollbar can be found when displayed on UI window ?
    Does the scroll have a idStr or some label to it assigned by your developers to find it?

    There are different options to try here ... I'm just starting the thinking process for you to consider.