Question

I want to know that how to remove the text from Textbox. I have did much search from Google but nothing found currently. Please tell me any Keyword which can help me for remove/clean text in field.

No correct solution

OTHER TIPS

You can use this also for clear test field..

driver.findElement(By.id("textfieldid")).sendKeys("");//empty string

or

Input Text (your web element locator ) ${empty}

You don't need a Robot to do it.. Just use Selenium.

driver.findElement(By.id("username")).clear();

http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/WebElement.html#clear()

You don't need it. Check here

def input_text(self, locator, text):
    """Types the given `text` into text field identified by `locator`.
       See `introduction` for details about locating elements. """
       self._info("Typing text '%s' into text field '%s'" % (text, locator))
       self._input_text_into_text_field(locator, text)

The Input Text keyword is calling the

_input_text_into_text_field 

which is anyway sending the clear command:

def _input_text_into_text_field(self, locator, text):
    element = self._element_find(locator, True, True)
    element.clear()
    element.send_keys(text)    
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top