Quantcast
Channel: Silk Test - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 625

How to scroll down vertically till an object is visible?

$
0
0

Hi,

While trying to automate using Silk4J, I am finding an issue in setting focus to an element.

I am clicking an object which is not visible in the screen. The click works fine but while taking screenshot it object not visible.

 

I tried in 2 ways, but both does not work. Could some one please help me with this?

1. Setting element focus

element.setFocus();

2.Scroll down using java script

BrowserWindow browser = desktop.find("//BrowserWindow");

browser.executeJavaScript("javascript:window.scrollBy(0,1000)");

 

 

-Alice


Viewing all articles
Browse latest Browse all 625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>