Skip to content

refactor: removed moveto command - #9116

Closed
vaibhavsingh97 wants to merge 8 commits into
SeleniumHQ:trunkfrom
vaibhavsingh97:remove-moveto-command
Closed

vaibhavsingh97 wants to merge 8 commits into
SeleniumHQ:trunkfrom
vaibhavsingh97:remove-moveto-command

Conversation

@vaibhavsingh97

@vaibhavsingh97 vaibhavsingh97 commented Jan 28, 2021 •

Copy link
Copy Markdown

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
Copy Markdown
Member

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

@vaibhavsingh97

Copy link
Copy Markdown
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

sonarqubecloud Bot commented Feb 2, 2021

Copy link
Copy Markdown

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
Copy Markdown
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

return driver.quit()
})

it('click(element)', async function () {

Copy link
Copy Markdown
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
Copy Markdown
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 el.getAttribute('value'), 'foOBar')
})

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

Copy link
Copy Markdown
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

.then(fail, (v) => assert.strictEqual(v, e))
})

describe('actions()', function () {

Copy link
Copy Markdown
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
Copy Markdown
Member

Hi @vaibhavsingh97 ,

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

Thanks,
Harsha

@harsha509 harsha509 mentioned this pull request Apr 6, 2021
3 of 8 tasks
@vaibhavsingh97

Copy link
Copy Markdown
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
Copy Markdown
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

diemol commented Apr 8, 2021

Copy link
Copy Markdown
Member

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