So what concrete suggestions do you have? The DOM structure in my case
is guite complex, for example the xpath or css path is "long".
The mouse is moved to the element, the element is clicked, but no way to
be moved.... I don't really know if it is even dragable by Selenium??
Any suggestions by others?
On 27.11.2015 16:18, Tatu Aalto wrote:
> Ugh
>
> The underlying selenium is really picky which element it is able to drag
> and drop. The more complex the DOM is, the harder it is find the right
> element to drag. Also not all elements can be dragged by selenium.
>
> -Tatu
> Send from my mobile
>
> On 27 Nov 2015 4:50 p.m., <
henric...@gmail.com
> <mailto:
henric...@gmail.com>> wrote:
>
> I am trying to drag an element to a specific location but no luck so
> far. I want to do it with
>
> Drag And Drop By Offset xpath=//*[@id="elementSource"] 450 0
>
> elementSource is <div id="elementSource" class="item ng-binding
> ng-scope" id="elementSource" ng-class="{onhover: hover}"
> ng-mouseenter="hover = true" ng-mouseleave="hover = false"> </div>.
>
> When the test comes to this point elementSource is visibly selected
> by mouse hover but there is no horizontal drag performed.
> ElementSource should be placed to a placeholder but it is not?? I
> have also tried with Keyword Drag And Drop
> xpath=//*[@id="elementSource"] xpath=//*[@id="dropArea"] where
> dropArea is ul element with id="dropArea".
>
> I am using the latest version of RF, Selenium lib, Firefox and
> Chrome. What am I doing so wrong???
>
> I am trying to drag an element to a specific location but no luck so
> far. I want to do it with
>
> *Drag And Drop By Offset xpath=//*[@id="elementSource"] 450 0*
>
> elementSource is <div id="elementSource" class="item ng-binding
> ng-scope" id="elementSource" ng-class="{onhover: hover}"
> ng-mouseenter="hover = true" ng-mouseleave="hover = false"> </div>.
>
> When the test comes to this point elementSource is visibly selected
> by mouse hover but there is no horizontal drag performed.
> ElementSource should be placed to a placeholder but it is not?? I
> have also tried with Keyword *Drag And Drop
> xpath=//*[@id="elementSource"] xpath=//*[@id="dropArea"]* where
> dropArea is ul element with id="dropArea".
>
> I am using the latest version of RF, Selenium lib, Firefox and
> Chrome. What am I doing so wrong???
>
> Dne četrtek, 13. september 2012 21.21.21 UTC+2 je oseba Mohan R
> napisala:
>
> Figured out how to do it with RF - Selenium library
>
> using the (undocumented) function drag_and_drop_by_offset
>
> Just in case anyone else needs it..
>
> On Tue, Sep 11, 2012 at 3:49 PM, Mohan R <
mohanr...@gmail.com>
> wrote:
>
> I want to interact with a slider in my test. Seems like
> Action Chains in Selenium are the way to do that.
>
> [selenium.webdriver.common.action_chains.ActionChains](
http://goldb.org/sst/selenium2_api_docs/html/selenium.webdriver.common.action_chains.ActionChains-class.html)
> [How to mouseover in python Webdriver - Google
> Groups](
https://groups.google.com/forum/?fromgroups=#!topic/selenium-users/fj1RVXKvAew)
>
> But how do I do this with Selenium2Library?
> There seems to be no mouse down and mouse move functions in
> Selenium2Library.
>
> Or as a fallback, how do I access the underlying selenium
> library via Selenium2Library instance ?
> Seems like there is a way to do it in SeleniumLibrary (via
> "Call Selenium Api" function and class attribute
> seleniumlib =
> BuiltIn().get_library___instance('SeleniumLibrary'), self.selenium
> <mailto:
robotframework-u...@googlegroups.com>.
> <mailto:
robotframe...@googlegroups.com>.
---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus