Discussion:
[selenium-users] Unable to scroll down in selenium
Shibi kp
2018-11-15 12:09:50 UTC
Permalink
OS Version:

Windows 8.1


*Selenium Version:*
Selenium version 3.14.0


*Browser:*
Firefox
-->

*Browser Version:*
63.0


*Expected Behavior -*

In web page webelement is present at end of the web page or middle of web
page.
It should automatically scroll down and perform action in webelement.


*Actual Behavior -*

But we getting Error message as "could not be scrolled into view" and
Exception as "org.openqa.selenium.ElementNotInteractableException".


Steps to reproduce -

1. Launch firefox using selenium 3.14.0 (download the latest version of
firefox)
2. Go to URL ("http://automationpractice.com/index.php")
3. Click the T- Shirt scroll down product will display.
4. Need to Click the webelement.

Firefox ErrorMessage.txt
<https://github.com/SeleniumHQ/selenium/files/2579619/Firefox.ErrorMessage.txt>

Please find the java code:-

driver.get("http://automationpractice.com/index.php");

driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

System.out.println("Page title is: " + driver.getTitle());

Assert.assertEquals("My Store", driver.getTitle());

waitForPageLoad();

driver.findElement(By.xpath("(//a[text()='T-shirts'])[2]")).click();

String ProductName=driver.findElement(By.xpath("//a[@class='product_img_link']")).getAttribute("title");

String ProductPrice=driver.findElement(By.xpath("//span[@Class
<https://github.com/Class>='price
product-price']")).getText().trim().toString();

driver.findElement(By.xpath("//a[@Class <https://github.com/Class>
='product_img_link']")).click();

Thanks & Regards,
Shibi KP
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1c4f58a7-3fa2-4c39-bfc5-0dd6cdb9882b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Meenal Jain
2018-11-20 03:39:07 UTC
Permalink
Hi Shibi,

Can you check if the element you want to access comes under an intake
because as per error message it comes into view i.e. frame so if this is
the case WWE've to first switch to the frame using driver.Switch.To("property
of iframe");
Then only you can access any element within that view. After you're done
with that view you've to again switch back to default using
driver.SwitchTo.Default();

Please let me know if you face any issue. Also let me know if this works
for you.

Thanks,
Meenal
Post by Shibi kp
Windows 8.1
*Selenium Version:*
Selenium version 3.14.0
*Browser:*
Firefox
-->
*Browser Version:*
63.0
*Expected Behavior -*
In web page webelement is present at end of the web page or middle of web
page.
It should automatically scroll down and perform action in webelement.
*Actual Behavior -*
But we getting Error message as "could not be scrolled into view" and
Exception as "org.openqa.selenium.ElementNotInteractableException".
Steps to reproduce -
1. Launch firefox using selenium 3.14.0 (download the latest version
of firefox)
2. Go to URL ("http://automationpractice.com/index.php")
3. Click the T- Shirt scroll down product will display.
4. Need to Click the webelement.
Firefox ErrorMessage.txt
<https://github.com/SeleniumHQ/selenium/files/2579619/Firefox.ErrorMessage.txt>
Please find the java code:-
driver.get("http://automationpractice.com/index.php");
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
System.out.println("Page title is: " + driver.getTitle());
Assert.assertEquals("My Store", driver.getTitle());
waitForPageLoad();
driver.findElement(By.xpath("(//a[text()='T-shirts'])[2]")).click();
<https://github.com/Class>='price
product-price']")).getText().trim().toString();
='product_img_link']")).click();
Thanks & Regards,
Shibi KP
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/1c4f58a7-3fa2-4c39-bfc5-0dd6cdb9882b%40googlegroups.com
<https://groups.google.com/d/msgid/selenium-users/1c4f58a7-3fa2-4c39-bfc5-0dd6cdb9882b%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAHd%3D%3DmJZsUsZtnC%2B0p4WweRCfbdKYVqDtZaO6DXnkd%2BCJ3SgQw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
kpshibi
2018-11-20 06:44:12 UTC
Permalink
Hi Meenal,

I have check that element that is not iframe element. Because I have
executed in other browser like chrome and IE it's working fine.

I'm facing error only in firefox only.

Thanks & Regards,
Shibi
Post by Meenal Jain
Hi Shibi,
Can you check if the element you want to access comes under an intake
because as per error message it comes into view i.e. frame so if this is
the case WWE've to first switch to the frame using driver.Switch.To("property
of iframe");
Then only you can access any element within that view. After you're done
with that view you've to again switch back to default using
driver.SwitchTo.Default();
Please let me know if you face any issue. Also let me know if this works
for you.
Thanks,
Meenal
Post by Shibi kp
Windows 8.1
*Selenium Version:*
Selenium version 3.14.0
*Browser:*
Firefox
-->
*Browser Version:*
63.0
*Expected Behavior -*
In web page webelement is present at end of the web page or middle of web
page.
It should automatically scroll down and perform action in webelement.
*Actual Behavior -*
But we getting Error message as "could not be scrolled into view" and
Exception as "org.openqa.selenium.ElementNotInteractableException".
Steps to reproduce -
1. Launch firefox using selenium 3.14.0 (download the latest version
of firefox)
2. Go to URL ("http://automationpractice.com/index.php")
3. Click the T- Shirt scroll down product will display.
4. Need to Click the webelement.
Firefox ErrorMessage.txt
<https://github.com/SeleniumHQ/selenium/files/2579619/Firefox.ErrorMessage.txt>
Please find the java code:-
driver.get("http://automationpractice.com/index.php");
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
System.out.println("Page title is: " + driver.getTitle());
Assert.assertEquals("My Store", driver.getTitle());
waitForPageLoad();
driver.findElement(By.xpath("(//a[text()='T-shirts'])[2]")).click();
<https://github.com/Class>='price
product-price']")).getText().trim().toString();
='product_img_link']")).click();
Thanks & Regards,
Shibi KP
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/1c4f58a7-3fa2-4c39-bfc5-0dd6cdb9882b%40googlegroups.com
<https://groups.google.com/d/msgid/selenium-users/1c4f58a7-3fa2-4c39-bfc5-0dd6cdb9882b%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/CAHd%3D%3DmJZsUsZtnC%2B0p4WweRCfbdKYVqDtZaO6DXnkd%2BCJ3SgQw%40mail.gmail.com
<https://groups.google.com/d/msgid/selenium-users/CAHd%3D%3DmJZsUsZtnC%2B0p4WweRCfbdKYVqDtZaO6DXnkd%2BCJ3SgQw%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALznS1OTZfMRFAU9JVyy0WrZ2kB9hqX5Jk09bpjZRx7STMt-ow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Meenal Jain
2018-11-20 12:56:30 UTC
Permalink
Hi Shibi,

According to the exception, element is not interactable so can you try
putting some wait before accessing the element. Also you can try finding
the element using loop.If element gets found then don't scroll down else
scroll down more. Have you tried scrolling using javascriptexecutor?

Thanks,
Meenal
Post by kpshibi
Hi Meenal,
I have check that element that is not iframe element. Because I have
executed in other browser like chrome and IE it's working fine.
I'm facing error only in firefox only.
Thanks & Regards,
Shibi
Post by Meenal Jain
Hi Shibi,
Can you check if the element you want to access comes under an intake
because as per error message it comes into view i.e. frame so if this is
the case WWE've to first switch to the frame using driver.Switch.To("property
of iframe");
Then only you can access any element within that view. After you're done
with that view you've to again switch back to default using
driver.SwitchTo.Default();
Please let me know if you face any issue. Also let me know if this works
for you.
Thanks,
Meenal
Post by Shibi kp
Windows 8.1
*Selenium Version:*
Selenium version 3.14.0
*Browser:*
Firefox
-->
*Browser Version:*
63.0
*Expected Behavior -*
In web page webelement is present at end of the web page or middle of
web page.
It should automatically scroll down and perform action in webelement.
*Actual Behavior -*
But we getting Error message as "could not be scrolled into view" and
Exception as "org.openqa.selenium.ElementNotInteractableException".
Steps to reproduce -
1. Launch firefox using selenium 3.14.0 (download the latest version
of firefox)
2. Go to URL ("http://automationpractice.com/index.php")
3. Click the T- Shirt scroll down product will display.
4. Need to Click the webelement.
Firefox ErrorMessage.txt
<https://github.com/SeleniumHQ/selenium/files/2579619/Firefox.ErrorMessage.txt>
Please find the java code:-
driver.get("http://automationpractice.com/index.php");
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
System.out.println("Page title is: " + driver.getTitle());
Assert.assertEquals("My Store", driver.getTitle());
waitForPageLoad();
driver.findElement(By.xpath("(//a[text()='T-shirts'])[2]")).click();
<https://github.com/Class>='price
product-price']")).getText().trim().toString();
='product_img_link']")).click();
Thanks & Regards,
Shibi KP
--
You received this message because you are subscribed to the Google
Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/1c4f58a7-3fa2-4c39-bfc5-0dd6cdb9882b%40googlegroups.com
<https://groups.google.com/d/msgid/selenium-users/1c4f58a7-3fa2-4c39-bfc5-0dd6cdb9882b%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/CAHd%3D%3DmJZsUsZtnC%2B0p4WweRCfbdKYVqDtZaO6DXnkd%2BCJ3SgQw%40mail.gmail.com
<https://groups.google.com/d/msgid/selenium-users/CAHd%3D%3DmJZsUsZtnC%2B0p4WweRCfbdKYVqDtZaO6DXnkd%2BCJ3SgQw%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/CALznS1OTZfMRFAU9JVyy0WrZ2kB9hqX5Jk09bpjZRx7STMt-ow%40mail.gmail.com
<https://groups.google.com/d/msgid/selenium-users/CALznS1OTZfMRFAU9JVyy0WrZ2kB9hqX5Jk09bpjZRx7STMt-ow%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAHd%3D%3DmJR5K_ZX%3D2wB30T%3D_k1Wha7B26r6jvyx%2Bn1Sx0hiVDxzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
kpshibi
2018-11-20 13:53:26 UTC
Permalink
yes i have tried with Javascript but javascript operation have completed
but action not happen in firefox browser.

I will try for wait page load function. or i will use thread.sleep().
Post by Meenal Jain
Hi Shibi,
According to the exception, element is not interactable so can you try
putting some wait before accessing the element. Also you can try finding
the element using loop.If element gets found then don't scroll down else
scroll down more. Have you tried scrolling using javascriptexecutor?
Thanks,
Meenal
Post by kpshibi
Hi Meenal,
I have check that element that is not iframe element. Because I have
executed in other browser like chrome and IE it's working fine.
I'm facing error only in firefox only.
Thanks & Regards,
Shibi
Post by Meenal Jain
Hi Shibi,
Can you check if the element you want to access comes under an intake
because as per error message it comes into view i.e. frame so if this is
the case WWE've to first switch to the frame using driver.Switch.To("property
of iframe");
Then only you can access any element within that view. After you're
done with that view you've to again switch back to default using
driver.SwitchTo.Default();
Please let me know if you face any issue. Also let me know if this
works for you.
Thanks,
Meenal
Post by Shibi kp
Windows 8.1
*Selenium Version:*
Selenium version 3.14.0
*Browser:*
Firefox
-->
*Browser Version:*
63.0
*Expected Behavior -*
In web page webelement is present at end of the web page or middle of
web page.
It should automatically scroll down and perform action in webelement.
*Actual Behavior -*
But we getting Error message as "could not be scrolled into view" and
Exception as "org.openqa.selenium.ElementNotInteractableException".
Steps to reproduce -
1. Launch firefox using selenium 3.14.0 (download the latest
version of firefox)
2. Go to URL ("http://automationpractice.com/index.php")
3. Click the T- Shirt scroll down product will display.
4. Need to Click the webelement.
Firefox ErrorMessage.txt
<https://github.com/SeleniumHQ/selenium/files/2579619/Firefox.ErrorMessage.txt>
Please find the java code:-
driver.get("http://automationpractice.com/index.php");
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
System.out.println("Page title is: " + driver.getTitle());
Assert.assertEquals("My Store", driver.getTitle());
waitForPageLoad();
driver.findElement(By.xpath("(//a[text()='T-shirts'])[2]")).click();
<https://github.com/Class>='price
product-price']")).getText().trim().toString();
='product_img_link']")).click();
Thanks & Regards,
Shibi KP
--
You received this message because you are subscribed to the Google
Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/1c4f58a7-3fa2-4c39-bfc5-0dd6cdb9882b%40googlegroups.com
<https://groups.google.com/d/msgid/selenium-users/1c4f58a7-3fa2-4c39-bfc5-0dd6cdb9882b%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/CAHd%3D%3DmJZsUsZtnC%2B0p4WweRCfbdKYVqDtZaO6DXnkd%2BCJ3SgQw%40mail.gmail.com
<https://groups.google.com/d/msgid/selenium-users/CAHd%3D%3DmJZsUsZtnC%2B0p4WweRCfbdKYVqDtZaO6DXnkd%2BCJ3SgQw%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/CALznS1OTZfMRFAU9JVyy0WrZ2kB9hqX5Jk09bpjZRx7STMt-ow%40mail.gmail.com
<https://groups.google.com/d/msgid/selenium-users/CALznS1OTZfMRFAU9JVyy0WrZ2kB9hqX5Jk09bpjZRx7STMt-ow%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/CAHd%3D%3DmJR5K_ZX%3D2wB30T%3D_k1Wha7B26r6jvyx%2Bn1Sx0hiVDxzg%40mail.gmail.com
<https://groups.google.com/d/msgid/selenium-users/CAHd%3D%3DmJR5K_ZX%3D2wB30T%3D_k1Wha7B26r6jvyx%2Bn1Sx0hiVDxzg%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALznS1Oet_OT9jVa0%2BYfBAoEn5BYb78ByvcE7_8hRmKHQYLF2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Villju Joseph
2018-11-21 02:51:32 UTC
Permalink
Use JavaScript executor to scroll down
Post by Shibi kp
Windows 8.1
*Selenium Version:*
Selenium version 3.14.0
*Browser:*
Firefox
-->
*Browser Version:*
63.0
*Expected Behavior -*
In web page webelement is present at end of the web page or middle of web
page.
It should automatically scroll down and perform action in webelement.
*Actual Behavior -*
But we getting Error message as "could not be scrolled into view" and
Exception as "org.openqa.selenium.ElementNotInteractableException".
Steps to reproduce -
1. Launch firefox using selenium 3.14.0 (download the latest version
of firefox)
2. Go to URL ("http://automationpractice.com/index.php")
3. Click the T- Shirt scroll down product will display.
4. Need to Click the webelement.
Firefox ErrorMessage.txt
<https://github.com/SeleniumHQ/selenium/files/2579619/Firefox.ErrorMessage.txt>
Please find the java code:-
driver.get("http://automationpractice.com/index.php");
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
System.out.println("Page title is: " + driver.getTitle());
Assert.assertEquals("My Store", driver.getTitle());
waitForPageLoad();
driver.findElement(By.xpath("(//a[text()='T-shirts'])[2]")).click();
<https://github.com/Class>='price product-price']")).getText().
trim().toString();
='product_img_link']")).click();
Thanks & Regards,
Shibi KP
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit https://groups.google.com/d/
msgid/selenium-users/1c4f58a7-3fa2-4c39-bfc5-0dd6cdb9882b%
40googlegroups.com
<https://groups.google.com/d/msgid/selenium-users/1c4f58a7-3fa2-4c39-bfc5-0dd6cdb9882b%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAKE2Uz3hecWf2bX5umUjE_S2sQXFpNi0kKK%2BX2769R4z5uMVDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...