Skip to content

Improving Exception handling and Element Search Logic  #5

@Anshul-18

Description

@Anshul-18

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions