79744116

Date: 2025-08-23 08:47:07
Score: 0.5
Natty:
Report link
Thanks all guys, who answered. For me the next code works fine:

public static async Task DragAndDrop(ILocator source, ILocator target, IPage page)
{
   var sourceBox = await source.BoundingBoxAsync();
   var targetBox = await target.BoundingBoxAsync();

   await page.Mouse.MoveAsync(sourceBox.X + sourceBox.Width / 2,     sourceBox.Y + sourceBox.Height / 2);
   await page.Mouse.DownAsync();
   await page.Mouse.MoveAsync(targetBox.X + targetBox.Width / 2, targetBox.Y + targetBox.Height / 2, new() { Steps = 20 });
   await page}
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Андрей Быков