Hello, hope someone can help.
I have a page which allows drag and drop.
i can select but when i use the move function i get out of bounds errors
i am trying to move the green blob Snow, Sandra to 1700 on the same row:
I am not a coder: so please be gentle
Drag and drop (webpage)
Drag and drop (webpage)
You do not have the required permissions to view the files attached to this post.
Re: Drag and drop (webpage)
Are you using a custom implementation for your drag and drop functionality or are you using the Drag and Drop method from the Ranorex automation helpers?
If you are not using the Ranorex automation helpers, I would suggest starting there:
https://www.ranorex.com/help/latest/han ... g-started/
hope this helps
If you are not using the Ranorex automation helpers, I would suggest starting there:
https://www.ranorex.com/help/latest/han ... g-started/
Code: Select all
User code methods
The user code methods included in the Ranorex Automation Helpers can be accessed in the ⇢ user code library. Select the desired method, define the required strings, and confirm your selection.
DragNDropLibrary
DragAndDrop
Picks the source element, drags it to the target element and drops it there.
...
Re: Drag and drop (webpage)
Neither: thanks i will check this out
Re: Drag and drop (webpage)
Hello again: i could not find
DragNDropLibrary in Nuget Application Helpers
DragNDropLibrary in Nuget Application Helpers
Re: Drag and drop (webpage)
Hi,
Could you please show us, how exactly do you perform the drag&drop operation? For example, post a screenshot of the recording table.
The problem is, that there is no "table" or "cells" to track. There is a number of divs, mimicking the table, where "cells" are mimicked by vertical "tabs"
What you need to do, in case you want to drop something to "cell" belonging to 17:00 column, is to first detect the child index of header cell 17:00 (childindex=17). And then find vertical tab with the same childindex.
Here is the xpath to detect the header cell "17:00", from which you need to take the childindex value and store it in variable (e.g. varCelIndex):
/dom[@domain='test2.mywebroster.com']//div[#'pane_2']//div[@class='header-container']/div[@innertext='17:00']
And here is the xpath to detect the cell split bar belonging to cell "17:00"
/dom[@domain='test2.mywebroster.com']//div[#'pane_2']//div[@class='body-container']/div[@Childindex=$varCelIndex]
Of course, you can completely skip the part where you detect childindex od header cell and simply insert "17 in repo xpath, but I personally don't like such hardcoded approach. It's always better to detect element based of the label or another identification attribute, either directly from the element in question or its ancestor or sibling.
Once the appropriate "cell" is detected, you may need to release the mouse not directly over the split element, but rather on the split bar + few pixels position? But this may need some tests
Could you please show us, how exactly do you perform the drag&drop operation? For example, post a screenshot of the recording table.
The problem is, that there is no "table" or "cells" to track. There is a number of divs, mimicking the table, where "cells" are mimicked by vertical "tabs"
What you need to do, in case you want to drop something to "cell" belonging to 17:00 column, is to first detect the child index of header cell 17:00 (childindex=17). And then find vertical tab with the same childindex.
Here is the xpath to detect the header cell "17:00", from which you need to take the childindex value and store it in variable (e.g. varCelIndex):
/dom[@domain='test2.mywebroster.com']//div[#'pane_2']//div[@class='header-container']/div[@innertext='17:00']
And here is the xpath to detect the cell split bar belonging to cell "17:00"
/dom[@domain='test2.mywebroster.com']//div[#'pane_2']//div[@class='body-container']/div[@Childindex=$varCelIndex]
Of course, you can completely skip the part where you detect childindex od header cell and simply insert "17 in repo xpath, but I personally don't like such hardcoded approach. It's always better to detect element based of the label or another identification attribute, either directly from the element in question or its ancestor or sibling.
Once the appropriate "cell" is detected, you may need to release the mouse not directly over the split element, but rather on the split bar + few pixels position? But this may need some tests
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Drag and drop (webpage)
Hi,
https://www.ranorex.com/help/latest/han ... g-started/
There is no Drag&Drop library in nuget packages. You must find and install Ranorex Automation Helpers where you can find Drag&Drop code module. For more details about Ranorex automation helpers read Ranorex user guide...
https://www.ranorex.com/help/latest/han ... g-started/
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Drag and drop (webpage)
As Pavel mentioned, there is no nuget package specifically for drag and drop. What you want to do is add the Ranorex automation helpers, and then when you create a new user code method, chose 'Select from library'. Here you will see tons of pre-built methods for you to chose from. Once of them is DragAndDrop. I would highly recommend checking out the documentation (there is a webinar too) but overall here are the high level steps:
https://www.ranorex.com/help/latest/han ... g-started/
- Right click your solution -> Ranorex Autiomation helpers -> Add
- Right click your solution -> Ranorex Autiomation helpers -> Update
- Open any recording module
- Add new action -> User code -> Select from library
- Pick DragAndDrop
Re: Drag and drop (webpage)
Thanks i have been pushed to another project for a bit: but thanks i will will re investigate this very soon