iOS: Performing swipe action on the tablecell.
Using TC, I am not able to perform the swipe action. Recording the swipe action in the UI, generates the following line but running it fails with "Object doesn't support this property"error. Please let me know if there's any work around for swipe action.
Sub Test
Mobile.Device.Process("x").Window.TableView.TableViewCell(1, 0).ScrollView.wPositionX = 82
End Sub
Thanks!
We've had some issues with this in the past too, but I think we have found a good solution to swipe from right to left in a TableVewCell. An example procedure is below (in DelphiScript). It finds the coordinates by using the cell's position and size, then swipes. Just pass in the TableViewCell object:
procedure SwipeToExposeRemoveButton(oTableViewCell : OleVariant);
var
iScreenTop, iScreenLeft, xStart, yStart, xEnd, yEnd : integer;
begin
iScreenTop := oTableViewCell.ScreenTop; // Get distance from top of cell to top of screen
iScreenLeft := oTableViewCell.ScreenLeft; // Get distance from left of cell to left of screen
// Define start and end coordinates to swipe
xStart := iScreenLeft + oTableViewCell.Width * 0.99; // Distance left of object + 99/100 the width of cell
yStart := oTableViewCell.Height/2 + iScreenTop; // Middle of cell heightwise
xEnd := iScreenLeft + oTableViewCell.Width * 0.01; // Distance left of object + 1/100 the width of cell
yEnd := yStart;
// Swipe to expose remove button
Mobile.Device.Swipe(xStart, yStart, xEnd, yEnd, 5, 200);
end;Hope this helps!
-Corey