Selenium move_to_element().perform() cannot move cursor [closed]
the website i am using
i want to use selenium to scroll down this web page, however the website is split into two screens which left side is a list of result, right side is a map.
In order to scroll left side down to bottom, the cursor have to be within result area.
So i tried perform() here, the xpath is pointing to one of the result, but it is not working:
hover = ActionChains(driver);
Elem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]/li[1]/p/a/img""");
hover.move_to_element(Elem_to_hover);
hover.perform();
So selenium is not able to use perform() when there are multiple same elements in the page?
Then i tried to use the xpath pointing to the result display area, but still not working
hover = ActionChains(driver);
Elem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]""");
hover.move_to_element(Elem_to_hover);
hover.perform();
python selenium
closed as unclear what you're asking by Corey Goldberg, Andersson, Bob Dalgleish, Marco Demaio, Billal Begueradj Jan 9 at 5:58
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
the website i am using
i want to use selenium to scroll down this web page, however the website is split into two screens which left side is a list of result, right side is a map.
In order to scroll left side down to bottom, the cursor have to be within result area.
So i tried perform() here, the xpath is pointing to one of the result, but it is not working:
hover = ActionChains(driver);
Elem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]/li[1]/p/a/img""");
hover.move_to_element(Elem_to_hover);
hover.perform();
So selenium is not able to use perform() when there are multiple same elements in the page?
Then i tried to use the xpath pointing to the result display area, but still not working
hover = ActionChains(driver);
Elem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]""");
hover.move_to_element(Elem_to_hover);
hover.perform();
python selenium
closed as unclear what you're asking by Corey Goldberg, Andersson, Bob Dalgleish, Marco Demaio, Billal Begueradj Jan 9 at 5:58
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Make sure element is visible before calling the methodElem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]""");
– santosh
Jan 3 at 17:10
tried and still no luck
– icantcode
Jan 3 at 17:28
add a comment |
the website i am using
i want to use selenium to scroll down this web page, however the website is split into two screens which left side is a list of result, right side is a map.
In order to scroll left side down to bottom, the cursor have to be within result area.
So i tried perform() here, the xpath is pointing to one of the result, but it is not working:
hover = ActionChains(driver);
Elem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]/li[1]/p/a/img""");
hover.move_to_element(Elem_to_hover);
hover.perform();
So selenium is not able to use perform() when there are multiple same elements in the page?
Then i tried to use the xpath pointing to the result display area, but still not working
hover = ActionChains(driver);
Elem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]""");
hover.move_to_element(Elem_to_hover);
hover.perform();
python selenium
the website i am using
i want to use selenium to scroll down this web page, however the website is split into two screens which left side is a list of result, right side is a map.
In order to scroll left side down to bottom, the cursor have to be within result area.
So i tried perform() here, the xpath is pointing to one of the result, but it is not working:
hover = ActionChains(driver);
Elem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]/li[1]/p/a/img""");
hover.move_to_element(Elem_to_hover);
hover.perform();
So selenium is not able to use perform() when there are multiple same elements in the page?
Then i tried to use the xpath pointing to the result display area, but still not working
hover = ActionChains(driver);
Elem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]""");
hover.move_to_element(Elem_to_hover);
hover.perform();
python selenium
python selenium
asked Jan 3 at 17:04
icantcodeicantcode
426
426
closed as unclear what you're asking by Corey Goldberg, Andersson, Bob Dalgleish, Marco Demaio, Billal Begueradj Jan 9 at 5:58
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by Corey Goldberg, Andersson, Bob Dalgleish, Marco Demaio, Billal Begueradj Jan 9 at 5:58
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Make sure element is visible before calling the methodElem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]""");
– santosh
Jan 3 at 17:10
tried and still no luck
– icantcode
Jan 3 at 17:28
add a comment |
Make sure element is visible before calling the methodElem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]""");
– santosh
Jan 3 at 17:10
tried and still no luck
– icantcode
Jan 3 at 17:28
Make sure element is visible before calling the method
Elem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]""");
– santosh
Jan 3 at 17:10
Make sure element is visible before calling the method
Elem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]""");
– santosh
Jan 3 at 17:10
tried and still no luck
– icantcode
Jan 3 at 17:28
tried and still no luck
– icantcode
Jan 3 at 17:28
add a comment |
1 Answer
1
active
oldest
votes
You can try,
driver.findElement(By.id("js-item-count-upside")).click();
WebElement element = driver.findElement(By.xpath("//*[@id='js-map-search-result-list']/li[1]/p/a/img"));
driver.executeScript("arguments[0].scrollIntoView()", element);
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can try,
driver.findElement(By.id("js-item-count-upside")).click();
WebElement element = driver.findElement(By.xpath("//*[@id='js-map-search-result-list']/li[1]/p/a/img"));
driver.executeScript("arguments[0].scrollIntoView()", element);
add a comment |
You can try,
driver.findElement(By.id("js-item-count-upside")).click();
WebElement element = driver.findElement(By.xpath("//*[@id='js-map-search-result-list']/li[1]/p/a/img"));
driver.executeScript("arguments[0].scrollIntoView()", element);
add a comment |
You can try,
driver.findElement(By.id("js-item-count-upside")).click();
WebElement element = driver.findElement(By.xpath("//*[@id='js-map-search-result-list']/li[1]/p/a/img"));
driver.executeScript("arguments[0].scrollIntoView()", element);
You can try,
driver.findElement(By.id("js-item-count-upside")).click();
WebElement element = driver.findElement(By.xpath("//*[@id='js-map-search-result-list']/li[1]/p/a/img"));
driver.executeScript("arguments[0].scrollIntoView()", element);
answered Jan 3 at 17:32
Dexterous SikhDexterous Sikh
513
513
add a comment |
add a comment |
Make sure element is visible before calling the method
Elem_to_hover = driver.find_element_by_xpath("""//*[@id="js-map-search-result-list"]""");
– santosh
Jan 3 at 17:10
tried and still no luck
– icantcode
Jan 3 at 17:28