Selenium move_to_element().perform() cannot move cursor [closed]












0















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();









share|improve this 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 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
















0















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();









share|improve this 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 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














0












0








0


0






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();









share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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 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



















  • 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

















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












1 Answer
1






active

oldest

votes


















1














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);





share|improve this answer






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    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);





    share|improve this answer




























      1














      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);





      share|improve this answer


























        1












        1








        1







        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);





        share|improve this answer













        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);






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 3 at 17:32









        Dexterous SikhDexterous Sikh

        513




        513

















            Popular posts from this blog

            Monofisismo

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas