moveTo() throws exception due to floating value of newXOffset or newYOffset variables
See original GitHub issueEnvironment (please complete the following information):
- WebdriverIO version: 6.1.16
- Mode: WDIO Testrunner
- If WDIO Testrunner, running sync/async: sync
- Node.js version: 12.16.3
- NPM version: 6.14.4
- Browser name and version: Chrome 83.0.4103.116
- Platform name and version: Windows 10
Config of WebdriverIO An example of how you configured WebdriverIO config
Describe the bug
When passing the float value for options.xOffset
and/or options.yOffset
, the function throws exception
Reason
While calculating newXOffset
or newYOffset
, the parseInt()
has been applied before subtracting the scrollX
or scrollY
respectively which might again result in float if the value of scrollX
or scrollY
is float.
Problem at L28 in moveTo.js
To Reproduce
Provide options.xOffset
and/or options.yOffset
in moveTo()
such that the const scrollX
and/or const scrollY
variables in moveTo()
are of type float
Expected behavior
options.x
and/or options.y
must allow float without error as the expected type is Number
as per the official documentation
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
@monil20 it has not been fixed yet. I closed the issue because we have a PR for it. Please follow #5572 for updates.
Will close this issue as an PR is already provided in #5572.