


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALtis09Zw-TAhUPD8kn6E1fR139nme3R%2BsJrH83k%3D_oQP%3Dg5OA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLkYiKFvRVTzGY-6jEBkXEjw%3DTwFAkS_c_A9A%3D6bScN5RA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALtis0-Kw5JdWVOL5eaCWcroFM_zuzOTdJTkGKbVJ%2B7Vi01iig%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAJPyTs1gusoOF40eN06WkvSoqAg2yJSCEWVCOJzwWsZ8A-zTHw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLnNae_FNo%2BOXwwRos_VdgQH8CHZUH2ZT2KnC4%3DHhB7cZg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALtis08%2BnzbHtUyOPRA%2B-uq-cEZsmGx3PkepcHs1mD74kNtfEw%40mail.gmail.com.
--
private By txt_Username = By.Id("some id here");
// method to fill field
public void txt_Username_SendKeys(string input)
{
driver.findElement(txt_Username).SendKeys(input);
}
You can try to highlight the element with the below way to highlight the webelement.
Instead of passing by value into javascript executor, you can pass the value of webelement as shown in screenshot
https://stackoverflow.com/questions/10660291/highlight-elements-in-webdriver-during-runtime
On Wed, 23 Oct, 2019, 3:04 pm Imran Khan, <itsmei...@gmail.com> wrote:
Dear all,--Good day to you !I have implemented POM concept in my framework. That looks like below,I have also developed few generic functions for certain operations. But, those accepts only WebElement type. I am unable to convert from By to WebElement. Can you please help me out with this?. PFB screenshot for the same,I am getting a below exception,Kindly help me to resolve this issue.Thank and Best Regards,Imran.
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seleniu...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALtis0955bSbn%2BmoVMhtZjthLVFC247UxzM7yEJZeTvObEHbSQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAJPyTs25gV-iK%3D-AZ93U3bk205D%3DUaU6mZo481k0aYY-ydxT-Q%40mail.gmail.com.