I need to automate the following scenario. I have a table on a web page, and you can drag and drop the table rows onto each other to switch their position.
Each table row has inside it multiple table datas that can redirect you to difference parts of the web app. So only by clicking and holding on the first element in the table row, is the drag action possible.
Selenium provides in the action builder the click_and_hold method. Problem is this clicks in middle of the table row and triggers another action that i don't want.
I have tried to click and hold on the first table data element in the row and then drop it in the next row, but it doesn't do anything.
I did it like this:
browser.action.click_and_hold(table_data).move_to(second_table_row).release(table_data).perform
My guess is that i would need to click and hold a certain coordinates, but i don't know how to do that.
I'm automating with ruby, but any valid examples in other languages would help me out as well.