Parallax image
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023
05:19 AM
05-24-2023
05:19 AM
Parallax image
Hello team
I have parallax image in a web page while i am scrolling the page till some point that image will be scrolling in the background of that page. Is it possible to verify that image is visible on screen while am scrolling the page??
I have parallax image in a web page while i am scrolling the page till some point that image will be scrolling in the background of that page. Is it possible to verify that image is visible on screen while am scrolling the page??
Labels:
12 REPLIES 12
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2023
02:42 AM
05-25-2023
02:42 AM
I understand that.
But you have to understand how your page is built, as not all CSS pages will have that property value set. In this example the visibility value changes depending on how much is scrolled,
It can be seen clearly while using DevTools.
You might have different element, property, attribute value that's changing which might not be shown in TC.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2023
03:11 AM
05-25-2023
03:11 AM
In devtool i didn't see any visibility property over there.
Can i use like this
Var img=page.findelement("xpath"). getBoundingClientRect(). top;
If(img>0)
Log. Message ("visible")
Else
Log. Message ("not visible")
After scroll to some point
If(img<0)
Log. Message ()
Else
Log. Message ()
Here img value before scrolling greater than 0 value after scrolling less than 0
If I am wrong correct me
Can i use like this
Var img=page.findelement("xpath"). getBoundingClientRect(). top;
If(img>0)
Log. Message ("visible")
Else
Log. Message ("not visible")
After scroll to some point
If(img<0)
Log. Message ()
Else
Log. Message ()
Here img value before scrolling greater than 0 value after scrolling less than 0
If I am wrong correct me
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2023
05:14 AM
05-25-2023
05:14 AM
I can't tell you which value is appropriate for your case. In my test, the image is not visible at -300. But it depends on how various elements of your webpage are organized.

- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »