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

Improving Exception handling and Element Search Logic #5

Open
Anshul-18 opened this issue Oct 16, 2024 · 2 comments · May be fixed by #11
Open

Improving Exception handling and Element Search Logic #5

Anshul-18 opened this issue Oct 16, 2024 · 2 comments · May be fixed by #11
Assignees

Comments

@Anshul-18
Copy link

I will be implementing some more exceptions in the code.

The current find_element() method checks for specific strategies like 'class_name', 'css_selector', and 'xpath' using multiple if-elif statements

This is not scalable if more strategies are needed (like ID, TAG_NAME). If an invalid strategy is passed, the program raises a ValueError manually instead of validating against Selenium's By class.

so i will be implementing getattr() to map the strategy dynamically from the By class, and handle invalid strategies properly.

So, can you please assign this issue to me.

@sunny7899
Copy link
Member

Go ahead @Anshul-18

@sunny7899 sunny7899 linked a pull request Oct 18, 2024 that will close this issue
@SparshKhanna0001
Copy link
Contributor

@sunny7899 will it still count towards the hacktoberfest...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants