Skip to content

refactor: removed moveto command #9116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

vaibhavsingh97
Copy link

@vaibhavsingh97 vaibhavsingh97 commented Jan 28, 2021

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Fixes #6809

Motivation and Context

We will be removing this legacy moveto action as w3c had implemented actions API which can be used to move the mouse.

  • Removed mouseMove function, as this method consumes command LEGACY_ACTION_MOUSE_MOVE.
  • Also removed Action.Type.POINTER_MOVE, as that switch case was using LEGACY_ACTION_MOUSE_MOVE, and we are deprecating it. As we had removed Action.Type.POINTER_MOVE, so now we don't need POINTER_MOVE as well.
  • Removed scheduleMouseAction_ function, as this method was using mouseMove.
  • Removed click, doubleClick, mouseDown, mouseUp, dragAndDrop and move functions as these functions were using scheduleMouseAction_

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@AutomatedTester
Copy link
Member

@vaibhavsingh97 That method can be removed too and then clean up the tests.

@vaibhavsingh97
Copy link
Author

@AutomatedTester thanks for the help 🙇
Can you please review it, I would love to address your comments. I had gone ahead and updated the PR description explaining the changes I had made.

@harsha509 harsha509 added the C-nodejs JavaScript Bindings label Feb 1, 2021
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 2, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

}
}

/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this PR we were only looking at mouseMove. The other files may need tweaks where they call mouseMove

@@ -50,115 +50,6 @@ test.suite(function (env) {
return driver.quit()
})

it('click(element)', async function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure that this test are related to the change

assert.equal(await box.getAttribute('class'), 'green')
})

it('click(element) clicks in center of element', async function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure that this test are related to the change

@@ -204,16 +95,5 @@ test.suite(function (env) {

assert.equal(await el.getAttribute('value'), 'foOBar')
})

it('can interact with simple form elements', async function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure that this test are related to the change

@@ -1526,76 +1526,6 @@ describe('WebDriver', function () {
.then(fail, (v) => assert.strictEqual(v, e))
})

describe('actions()', function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not related to the legacy move

@harsha509
Copy link
Member

Hi @vaibhavsingh97 ,

Did you get a chance to look into the above comments ?

Thanks,
Harsha

@vaibhavsingh97
Copy link
Author

Hi @vaibhavsingh97 ,

Did you get a chance to look into the above comments ?

Thanks,
Harsha

Apologies I couldn't get back on time for this 😅. I have some issues with JS tests, will be fixing those first. I will try to quickly resolve this.

Thanks much for understanding 🙏 🙇

@harsha509
Copy link
Member

Hi @vaibhavsingh97 ,

Thanks for the PR.

As I didn't got the reply soon, so I replaced this PR is replaced with PR #9362 as removing legacy actions will also remove bridge actions and removing respective tests.

@diemol
Copy link
Member

diemol commented Apr 8, 2021

Closing as the changes were merged in a different PR.

@diemol diemol closed this Apr 8, 2021
@vaibhavsingh97 vaibhavsingh97 deleted the remove-moveto-command branch April 18, 2021 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-nodejs JavaScript Bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

POST /session/<sessionid>/moveto did not match a known command
4 participants