Search This Blog

August 21, 2018

How to get the value from the textbox in Selenium?

Today one colleague asked me one question. If he entered the value in the textbox, how to get that value from textbox in C# and Selenium ?  

It is simple. You can use GetAttribute("value") to achieve your goal.  

        public string GetTextBoxValue(IWebElement textBoxElement) 
        { 
            return textBoxElement.GetAttribute("value");    
        } 

2 comments:

akhilapriya404 said...

Nice information thank you,if you want more information please visit our linkselenium Online Training Bangalore

Rajesh said...


Awesome Post.Your information is really interesting. The content show cases your in-depth knowledge. Thanks for Sharing.
Selenium Training in chennai | Selenium Training in anna nagar | Selenium Training in omr | Selenium Training in porur | Selenium Training in tambaram | Selenium Training in velachery