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 xpath selector option #58

Merged
merged 3 commits into from
Feb 14, 2019
Merged

add xpath selector option #58

merged 3 commits into from
Feb 14, 2019

Conversation

VelikiiNehochuha
Copy link
Contributor

No description provided.

@ojii
Copy link
Contributor

ojii commented Feb 9, 2019

Thank you for your pull request, at first glance it looks good but there's one minor change I would appreciate. Could you make the selector_type and Enum? The possible values can be found here.

@VelikiiNehochuha
Copy link
Contributor Author

I've taken possible values from selenium https://selenium-python.readthedocs.io/api.html#selenium.webdriver.common.by.By, so

class SelectorType(Enum):
    CLASS_NAME = "class name"
    CSS_SELECTOR = "css selector"
    ID = "id"
    LINK_TEXT = "link text"
    NAME = "name"
    PARTIAL_LINK_TEXT = "partial link text"
    TAG_NAME = "tag name"
    XPATH = "xpath" 

@ojii ojii merged commit 9fad2bf into HENNGE:master Feb 14, 2019
@ojii
Copy link
Contributor

ojii commented Feb 14, 2019

@OmJan thank you for your contribution, I've moved the selector types to constants.py and lowercased all the names.

@ojii
Copy link
Contributor

ojii commented Feb 14, 2019

@OmJan I've also removed the non-official selector types again since they don't actually work (I assume selenium implements these client side) and are neatly covered by the css selector anyway.

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

Successfully merging this pull request may close these issues.

2 participants