Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

» Selenium IDE Verify different Maps (Hybridview, Mapview etc.)
Fri Nov 25, 2016 9:56 pm by DJ87

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

How to scroll down for specific div on page using Selenium TestNG

View previous topic View next topic Go down

How to scroll down for specific div on page using Selenium TestNG

Post by Nisha14 on Mon Dec 22, 2014 1:25 pm

Hello,

I am new in Selenium, we are using Selenium TestNG. in my method i need to do scroll down to find out the element dynamiically. 
Scroll down of specific div of page. Please if anyone knows about it then guide.

Thanks.

Nisha14

Posts : 1
Join date : 2014-12-17

Back to top Go down

Re: How to scroll down for specific div on page using Selenium TestNG

Post by shweta.bet on Wed Dec 24, 2014 5:21 pm

You can scroll down by one page by using below snippet



Code:

JavascriptExecutor js = (JavascriptExecutor)

[i][size=16][color=#0000c0][size=16][color=#0000c0]driver[/color][/size][/color][/size][/i][size=16][color=#0000c0][size=16][color=#0000c0][/color][/size][/color][/size][size=16];[/size]
[size=16]
[/size]

      js.executeScript(

[size=16][color=#2a00ff][size=16][color=#2a00ff]"window.scroll(0, 350);"[/color][/size][/color][/size][size=16]);[/size]

shweta.bet

Posts : 7
Join date : 2014-11-14
Age : 34

Back to top Go down

Re: How to scroll down for specific div on page using Selenium TestNG

Post by nabhanya.varma on Sun Jan 25, 2015 8:30 pm

You can try using JavaScriptExecutor.

There is a way where you can scroll to particular element. below is the code snippet.


Code:
((JavascriptExecutor) driver).executeScript(
                "arguments[0].scrollIntoView();", element);



There are different ways of scrolling a page. You can also refer the below url for more details on scroll. 

http://seleniumeasy.com/selenium-tutorials/scrolling-web-page-with-selenium-webdriver-using-java

nabhanya.varma
Active particpant
Active particpant

Posts : 13
Join date : 2014-03-02

Back to top Go down

Re: How to scroll down for specific div on page using Selenium TestNG

Post by AgoBalan on Mon Feb 23, 2015 3:48 pm

see you are question is not more specific, please refining it ito the excat issues..

if page scroller is Browser scroller,den no need to scroll it separately,Selenium WEbDriver is able to find the element even it is at eh bottom of the page..

if the scroll is programatically done in the web application, that is application itself completely dynamic .. you can click on the scrool down (DOWN arrow of the scroll ) until u reach your element..

AgoBalan
Amateur
Amateur

Posts : 36
Join date : 2015-02-23

Back to top Go down

Re: How to scroll down for specific div on page using Selenium TestNG

Post by Sponsored content Today at 1:19 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum