How to delete text in Robotium?
In this article we are going to see how can we clear text from a android item or a web element with robotium framework.
After Initiating solo, we will mainly two type asserts
-To clear text from current edit text item(in here myEditText)
solo.clearEditText(myEditText);
-To clear text from currently active edit text item's index(zero based)
solo.clearEditText(0);
-To clear text from a web element specified by a locator(i used Xpath, you may use others, see all By options from this post)
solo.clearTextInWebElement(By.xpath("XpathOftheItem"));
Thanks...:)
After Initiating solo, we will mainly two type asserts
-To clear text from current edit text item(in here myEditText)
solo.clearEditText(myEditText);
-To clear text from currently active edit text item's index(zero based)
solo.clearEditText(0);
-To clear text from a web element specified by a locator(i used Xpath, you may use others, see all By options from this post)
solo.clearTextInWebElement(By.xpath("XpathOftheItem"));
Thanks...:)