Skip to content
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

Add script to test the feature to add slurs via right click #202

Open
Bhargav-Dave opened this issue Dec 2, 2022 · 0 comments
Open

Add script to test the feature to add slurs via right click #202

Bhargav-Dave opened this issue Dec 2, 2022 · 0 comments
Assignees

Comments

@Bhargav-Dave
Copy link
Contributor

Currently the newly added feature of adding slurs via right click does not have an automated script to test. Adding it would allow us to test that feature when new features are added.

I believe the action chains of selenium can be useful in creating a script for the same: https://www.selenium.dev/selenium/docs/api/py/webdriver/selenium.webdriver.common.action_chains.html

Especially the click_and_hold() (For seleciton), context_click() (For right click) and move_by_offset(x,y) (for dragging cursor to select)

Thus, if you know the element (defined as 'ele' below) in which the text is present, the line to select some word in it would go something like the following:

# create action chain object
action = ActionChains(driver)
# selecting the item
action.click_and_hold(on_element = ele).move_by_offset(30,0).release().context_click().perform()
@Bhargav-Dave Bhargav-Dave self-assigned this Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant