I am a newbie to Selenium
and this doubt might be basic. I have an input element of type text
which has some default value but i need to clear
that value and insert
a new value.
Can somebody help please? Thanks in advance.
I am a newbie to Selenium
and this doubt might be basic. I have an input element of type text
which has some default value but i need to clear
that value and insert
a new value.
Can somebody help please? Thanks in advance.
In webdriver you can use the clear command
@d = Selenium::WebDriver.for(:remote, :url => "http://localhost:8080/wd/hub/")
@d.navigate.to <your site>
@d.find_element(:name, "username")
@d.clear() #clears any text that was in the username field
@d.send_keys ("user") #enters the new text
It would be more helpful if you post question with code snippet. Anyhow, short answer.
selenium.type("//input[@name='INPUTNAME']","NEW VALUE");