yashaka / NSelene

Consise API to Selenium for .Net (the port of Selene in python / Selenide in Java)
MIT License
68 stars 21 forks source link

It is possible to add some SelectElement wrapper? #70

Open NahrebetskyiPavel opened 4 years ago

NahrebetskyiPavel commented 4 years ago

Smth like:

SeleneElement sElement = S("...")

public SeleneElement SelectElementByIndex(SeleneElement element, int index) {
new SelectElemen(element.ActualWebElement).SelectByIndex(index); return element; }

yashaka commented 4 years ago

It's possible, but such feature will be "not for all". On many projects the implementation of Selects is custom. You will definitely need implementing your own wrapper on such projects. Why then add some feature to Selene, that will be be usefull only for someone? Take also into account that a lot of newcomers will try to use this feature, fail and will struggle to find the cause...

Yet, we can think more on this topic... Maybe I am wrong:) Maybe we could add such wrapper into some "support" namespace and mark it as "better to copy & paste this code into your project and edit, don't use it as it is"...