Trying to choose an option from a dropdown list but can't use Select nor arrow keys...

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Trying to choose an option from a dropdown list but can't use Select nor arrow keys...

Ice Tea
https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium

Problem as stated in the question, these are the errors I get (included so people can find this post when they get the same error in the future) but the full explanation is in the link above >< 

Using Firefox:
ElementNotInteractableException:  Element <option> could not be scrolled into view


Using Chrome: 
ElementNotVisibleException: element not visible: Element is not currently visible and may not be manipulated

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/5ce9c7c0-aee0-403e-a7e4-6322d3ebaf4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to choose an option from a dropdown list but can't use Select nor arrow keys...

total QA
Hi,

Make sure you select the option only once you click on the Select element.
Please find the Logic mentioned below:

<select id="Day">
<option value="">1</option>
<option value="">2</option>
</select>

Before selecting the option try this way

driver.findElement(By.id("Day")).click();//Let the list is activated..
Go for selection now..new Select(driver.findElement(By.id("Day")).selectByVisibleText("1");

Regards,




On Wednesday, June 20, 2018 at 9:52:58 AM UTC+5:30, Ice Tea wrote:
<a href="https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F50939687%2Funable-to-click-option-in-dropdown-list-selenium\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-LvZT9aaXddR1VpGg2UyHPkRzdg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F50939687%2Funable-to-click-option-in-dropdown-list-selenium\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-LvZT9aaXddR1VpGg2UyHPkRzdg&#39;;return true;">https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium

Problem as stated in the question, these are the errors I get (included so people can find this post when they get the same error in the future) but the full explanation is in the link above >< 

Using Firefox:
ElementNotInteractableException:  Element <option> could not be scrolled into view


Using Chrome: 
ElementNotVisibleException: element not visible: Element is not currently visible and may not be manipulated

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8384b6b1-deb1-41b7-baf9-2352632283a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to choose an option from a dropdown list but can't use Select nor arrow keys...

Ice Tea
Unforunately, I can't click the list. I get an
AttributeError: 'NoneType' object has no attribute 'send_keys'

if it helps, when I hover over the select element in developer tools, the dropdown list is not highlighted (nothing is highlighted)

On Wednesday, June 20, 2018 at 12:13:55 PM UTC+7, total QA wrote:
Hi,

Make sure you select the option only once you click on the Select element.
Please find the Logic mentioned below:

<select id="Day">
<option value="">1</option>
<option value="">2</option>
</select>

Before selecting the option try this way

driver.findElement(By.id("Day")).click();//Let the list is activated..
Go for selection now..new Select(driver.findElement(By.id("Day")).selectByVisibleText("1");

Regards,
<a href="http://total-qa.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_I9o1Y5-_hJUa-u9_1b2_CObblA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_I9o1Y5-_hJUa-u9_1b2_CObblA&#39;;return true;">total-qa.com




On Wednesday, June 20, 2018 at 9:52:58 AM UTC+5:30, Ice Tea wrote:
<a href="https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F50939687%2Funable-to-click-option-in-dropdown-list-selenium\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-LvZT9aaXddR1VpGg2UyHPkRzdg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F50939687%2Funable-to-click-option-in-dropdown-list-selenium\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-LvZT9aaXddR1VpGg2UyHPkRzdg&#39;;return true;">https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium

Problem as stated in the question, these are the errors I get (included so people can find this post when they get the same error in the future) but the full explanation is in the link above >< 

Using Firefox:
ElementNotInteractableException:  Element <option> could not be scrolled into view


Using Chrome: 
ElementNotVisibleException: element not visible: Element is not currently visible and may not be manipulated

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/26d71bed-4ae1-4355-ae12-fcc49ffdfb0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to choose an option from a dropdown list but can't use Select nor arrow keys...

Ice Tea
In reply to this post by total QA
Unforunately I get this error...
AttributeError: 'Select' object has no attribute 'click'

In fact when I hover over the select section in the element tag of the developer tools, I don't see anything highlighted on the actual page..

On Wednesday, June 20, 2018 at 12:13:55 PM UTC+7, total QA wrote:
Hi,

Make sure you select the option only once you click on the Select element.
Please find the Logic mentioned below:

<select id="Day">
<option value="">1</option>
<option value="">2</option>
</select>

Before selecting the option try this way

driver.findElement(By.id("Day")).click();//Let the list is activated..
Go for selection now..new Select(driver.findElement(By.id("Day")).selectByVisibleText("1");

Regards,
<a href="http://total-qa.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_I9o1Y5-_hJUa-u9_1b2_CObblA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_I9o1Y5-_hJUa-u9_1b2_CObblA&#39;;return true;">total-qa.com




On Wednesday, June 20, 2018 at 9:52:58 AM UTC+5:30, Ice Tea wrote:
<a href="https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F50939687%2Funable-to-click-option-in-dropdown-list-selenium\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-LvZT9aaXddR1VpGg2UyHPkRzdg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F50939687%2Funable-to-click-option-in-dropdown-list-selenium\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-LvZT9aaXddR1VpGg2UyHPkRzdg&#39;;return true;">https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium

Problem as stated in the question, these are the errors I get (included so people can find this post when they get the same error in the future) but the full explanation is in the link above >< 

Using Firefox:
ElementNotInteractableException:  Element <option> could not be scrolled into view


Using Chrome: 
ElementNotVisibleException: element not visible: Element is not currently visible and may not be manipulated

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/9b074a0e-7252-41ad-b91a-97bd82aaed50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to choose an option from a dropdown list but can't use Select nor arrow keys...

total QA
Can you check there is an arrow available for the Listbox. Get the properties of the arrow and click on it.

Regards,

On Wednesday, June 20, 2018 at 11:58:32 AM UTC+5:30, Ice Tea wrote:
Unforunately I get this error...
AttributeError: 'Select' object has no attribute 'click'

In fact when I hover over the select section in the element tag of the developer tools, I don't see anything highlighted on the actual page..

On Wednesday, June 20, 2018 at 12:13:55 PM UTC+7, total QA wrote:
Hi,

Make sure you select the option only once you click on the Select element.
Please find the Logic mentioned below:

<select id="Day">
<option value="">1</option>
<option value="">2</option>
</select>

Before selecting the option try this way

driver.findElement(By.id("Day")).click();//Let the list is activated..
Go for selection now..new Select(driver.findElement(By.id("Day")).selectByVisibleText("1");

Regards,
<a href="http://total-qa.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_I9o1Y5-_hJUa-u9_1b2_CObblA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_I9o1Y5-_hJUa-u9_1b2_CObblA&#39;;return true;">total-qa.com




On Wednesday, June 20, 2018 at 9:52:58 AM UTC+5:30, Ice Tea wrote:
<a href="https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F50939687%2Funable-to-click-option-in-dropdown-list-selenium\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-LvZT9aaXddR1VpGg2UyHPkRzdg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F50939687%2Funable-to-click-option-in-dropdown-list-selenium\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-LvZT9aaXddR1VpGg2UyHPkRzdg&#39;;return true;">https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium

Problem as stated in the question, these are the errors I get (included so people can find this post when they get the same error in the future) but the full explanation is in the link above >< 

Using Firefox:
ElementNotInteractableException:  Element <option> could not be scrolled into view


Using Chrome: 
ElementNotVisibleException: element not visible: Element is not currently visible and may not be manipulated

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/422b6240-557a-48f8-9060-53c74af738f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to choose an option from a dropdown list but can't use Select nor arrow keys...

Ice Tea
I elaborated in the Stack Overflow post but not here but... I can click on the list. I just can't select the option. Is there a way I can click on the option without the Select module?

On Wednesday, June 20, 2018 at 4:03:07 PM UTC+7, total QA wrote:
Can you check there is an arrow available for the Listbox. Get the properties of the arrow and click on it.

Regards,
<a href="http://total-qa.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy0HqXnJYG6FTFjSOPNs0WwDZanw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy0HqXnJYG6FTFjSOPNs0WwDZanw&#39;;return true;">total-qa.com

On Wednesday, June 20, 2018 at 11:58:32 AM UTC+5:30, Ice Tea wrote:
Unforunately I get this error...
AttributeError: 'Select' object has no attribute 'click'

In fact when I hover over the select section in the element tag of the developer tools, I don't see anything highlighted on the actual page..

On Wednesday, June 20, 2018 at 12:13:55 PM UTC+7, total QA wrote:
Hi,

Make sure you select the option only once you click on the Select element.
Please find the Logic mentioned below:

<select id="Day">
<option value="">1</option>
<option value="">2</option>
</select>

Before selecting the option try this way

driver.findElement(By.id("Day")).click();//Let the list is activated..
Go for selection now..new Select(driver.findElement(By.id("Day")).selectByVisibleText("1");

Regards,
<a href="http://total-qa.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_I9o1Y5-_hJUa-u9_1b2_CObblA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_I9o1Y5-_hJUa-u9_1b2_CObblA&#39;;return true;">total-qa.com




On Wednesday, June 20, 2018 at 9:52:58 AM UTC+5:30, Ice Tea wrote:
<a href="https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F50939687%2Funable-to-click-option-in-dropdown-list-selenium\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-LvZT9aaXddR1VpGg2UyHPkRzdg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F50939687%2Funable-to-click-option-in-dropdown-list-selenium\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-LvZT9aaXddR1VpGg2UyHPkRzdg&#39;;return true;">https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium

Problem as stated in the question, these are the errors I get (included so people can find this post when they get the same error in the future) but the full explanation is in the link above >< 

Using Firefox:
ElementNotInteractableException:  Element <option> could not be scrolled into view


Using Chrome: 
ElementNotVisibleException: element not visible: Element is not currently visible and may not be manipulated

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/bce07842-947f-4166-9e7b-6d566ce52827%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to choose an option from a dropdown list but can't use Select nor arrow keys...

total QA
Yes it can be done. by Taking the Xpath of the Option available in the Listbox.

Regards,
total-qa.com

On Thursday, June 21, 2018 at 9:11:58 AM UTC+5:30, Ice Tea wrote:
I elaborated in the Stack Overflow post but not here but... I can click on the list. I just can't select the option. Is there a way I can click on the option without the Select module?

On Wednesday, June 20, 2018 at 4:03:07 PM UTC+7, total QA wrote:
Can you check there is an arrow available for the Listbox. Get the properties of the arrow and click on it.

Regards,
<a href="http://total-qa.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy0HqXnJYG6FTFjSOPNs0WwDZanw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy0HqXnJYG6FTFjSOPNs0WwDZanw&#39;;return true;">total-qa.com

On Wednesday, June 20, 2018 at 11:58:32 AM UTC+5:30, Ice Tea wrote:
Unforunately I get this error...
AttributeError: 'Select' object has no attribute 'click'

In fact when I hover over the select section in the element tag of the developer tools, I don't see anything highlighted on the actual page..

On Wednesday, June 20, 2018 at 12:13:55 PM UTC+7, total QA wrote:
Hi,

Make sure you select the option only once you click on the Select element.
Please find the Logic mentioned below:

<select id="Day">
<option value="">1</option>
<option value="">2</option>
</select>

Before selecting the option try this way

driver.findElement(By.id("Day")).click();//Let the list is activated..
Go for selection now..new Select(driver.findElement(By.id("Day")).selectByVisibleText("1");

Regards,
<a href="http://total-qa.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_I9o1Y5-_hJUa-u9_1b2_CObblA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftotal-qa.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_I9o1Y5-_hJUa-u9_1b2_CObblA&#39;;return true;">total-qa.com




On Wednesday, June 20, 2018 at 9:52:58 AM UTC+5:30, Ice Tea wrote:
<a href="https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F50939687%2Funable-to-click-option-in-dropdown-list-selenium\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-LvZT9aaXddR1VpGg2UyHPkRzdg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F50939687%2Funable-to-click-option-in-dropdown-list-selenium\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-LvZT9aaXddR1VpGg2UyHPkRzdg&#39;;return true;">https://stackoverflow.com/questions/50939687/unable-to-click-option-in-dropdown-list-selenium

Problem as stated in the question, these are the errors I get (included so people can find this post when they get the same error in the future) but the full explanation is in the link above >< 

Using Firefox:
ElementNotInteractableException:  Element <option> could not be scrolled into view


Using Chrome: 
ElementNotVisibleException: element not visible: Element is not currently visible and may not be manipulated

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1961f416-de36-46bc-a14d-132c39a204af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.