porscheinformatik / selenium-components

A small framework on top of Selenium to access web elements more easily.
MIT License
5 stars 5 forks source link

Duplicate Anchor Component #2

Open furti opened 6 years ago

furti commented 6 years ago

Why is there a at.porscheinformatik.seleniumcomponents.component.LinkComponent and a at.porscheinformatik.seleniumcomponents.component.AComponent for the same thing, a HTML anchor element?

AComponent is not the best name for a component btw. because it looks so generic. Given that SeleniumContainer uses a generic type of AnyChildComponent the name AComponent is really confusing.

thred commented 6 years ago

Yep. Had my problems with the name, too. On one hand we could name components like the HTML tags. The name "AComponent" is correct in this case. On the other hand, we could name the components more generic, like "LinkComponent", "HtmlComponent", "BlockComponent". First, I thought it's better to name the elements like the HTML tags for a couple of reasons, e.g. that you can skip the selector or build special components for Angular. But the more I use these component, it seems better to build and use generic components. Currently I would remove the explicitly named components and just use generic ones. Ok?