量角器打字稿上的拖放操作出错,“{x: 540, y: 504}”类型的参数不可分配给 'ILocation' 类型的参数

Error on drag and drop action on protractor typescript, Argument of type '"{x: 540, y: 504}"' is not assignable to parameter of type 'ILocation'

我需要这方面的帮助,我在对打字稿进行拖放操作时遇到了这个错误。知道如何解决这个问题吗?

browser.actions().
  mouseDown(element(by.id('waze_map1')), '{x: 191, y: 56}').
  mouseMove(element(by.id('waze_map1')), '{x: 540, y: 504}').
  mouseUp().
  perform();

发生错误:

Argument of type '"{x: 540, y: 504}"' is not assignable to parameter of type 'ILocation'.ts(2345)

ILocation 接口是 {x:number,y:number} 但你试图设置字符串

变化:

browser.actions().
  mouseDown(element(by.id('waze_map1')), '{x: 191, y: 56}').
  mouseMove(element(by.id('waze_map1')), '{x: 540, y: 504}').
  mouseUp().
  perform();

browser.actions().
      mouseDown(element(by.id('waze_map1')), '{x: 191, y: 56}').
      mouseMove(element(by.id('waze_map1')), {x: 540, y: 504}).
      mouseUp().
      perform();

。 .