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

add implicit operator to support WebElement webelement = page.pageFactoryElement; SElement selement = webelement; #26

Closed yashaka closed 8 years ago

yashaka commented 8 years ago

Unfortunately this is impossible for all cases We can't do this in case we want to use our own driver...

        public static implicit operator SElement(IWebElement webelement)
        {
            return new SElement(webelement, DRIVER); // we need to pass the driver here, but there is no ability to pass it during implicit cast... 
        }