.NET version: 4.0
Platform: windows 7
Language: C#
I wrote code to do multiple drag and drops by using:
MoveTo();
ButtonDown();
Delay.Duration(...);
MoveTo();
ButtonUp();
However, this sequence only works once - it does not work if I call it in a loop in the following scenario:
Drag from cell1 and drop to cell2, from cell2 to cell3, from cell3 to cell4...
I tried using Ranorex global recording to do the same thing the code that Ranorex generates looks like the following:
This sequence worked. However, it does not work if I get rid of the "repo.cellInfo" in Report.Log() function.
Any idea how this repository as a param[] IReportMetaData affects consecutive drag and drops?
[Ranorex Code]:
public void Mouse_Up_Cell3() { // Your code goes here. Code inside this method will not be changed by the code generator. Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Up item 'Cell3' at 16;5.", repo.Cell3Info, new RecordItemIndex(-1)); repo.Cell2.MoveTo("16;5"); Mouse.ButtonUp(MouseButtons.Left); } public void Mouse_Down_Cell2() { // Your code goes here. Code inside this method will not be changed by the code generator. Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Down item 'Cell2' at 15;7.", repo.Cell2Info, new RecordItemIndex(-1)); repo.Cell2.MoveTo("15;7"); Mouse.ButtonDown(MouseButtons.Left); } public void Mouse_Up_Cell1() { // Your code goes here. Code inside this method will not be changed by the code generator. Report.Log(ReportLevel..Info, "Mouse", "Mouse Left Up item 'Cell1' at 17;10.", repo.Cell1Info, new RecordItemIndex(-1)); repo.Cell1.MoveTo("17;10"); Mouse.ButtonUp(MouseButtons.Left); } public void Mouse_Down_Cell1() { // Your code goes here. Code inside this method will not be changed by the code generator. Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Down item 'Cell1' at 17;10.", repo.Cell1Info, new RecordItemIndex(-1)); repo.Cell1.MoveTo("17;10"); Mouse.ButtonDown(MouseButtons.Left); }