Comments (5)
I have a form which has persisted data that I'd like to change.
Enter text appended the new text to the end of the existing text. So either
enter
text should clear the exiting text first, or I need to be able to call a method
to
clear the text.
/**
* To clear the value of an edit text
*/
public void clearEditText(int index)
{
final EditText editText = getCurrentEditTexts().get(index);
getCurrentActivity().runOnUiThread(new Runnable()
{
public void run()
{
editText.setText("");
}
});
}
Original comment by [email protected]
on 16 Apr 2010 at 2:19
from robotium.
/**
* For when some long running process is working, in order to determine when it
is done
*/
public void waitForText(String text)
throws RuntimeException
{
waitForText(text, DEFAULT_TIMEOUT_MILLIS);
}
public void waitForText(String text, long millis)
throws RuntimeException
{
long now = System.currentTimeMillis();
final long timeout = now + millis;
while (!(searchText(text) && searchEditText(text)) && now < timeout)
{
now = System.currentTimeMillis();
}
now = System.currentTimeMillis();
if (now > timeout)
{
throw new RuntimeException(format("failed to find text '%s' within
required time %sm", text, millis));
}
return;
}
Original comment by [email protected]
on 16 Apr 2010 at 2:19
from robotium.
Thanks for contributing. This will be included into the next release.
Original comment by [email protected]
on 19 Apr 2010 at 6:29
- Changed state: Accepted
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from robotium.
Will be included in the next release.
Original comment by [email protected]
on 29 Apr 2010 at 9:20
- Changed state: Started
from robotium.
Original comment by [email protected]
on 10 May 2010 at 3:52
- Changed state: Verified
from robotium.
Related Issues (20)
- instanceof instead of class name comparison HOT 6
- work with dialogs HOT 2
- Selection of suggestion from suggestion list HOT 2
- create excel sheet HOT 2
- Capital mode function HOT 1
- Print Function HOT 1
- Scroller.drag incorrect fromX/fromY/toX/toY usage HOT 2
- ArrayIndexOutOfBoundsException while looking for a view with searchText HOT 8
- Does not work on Samsung Galaxy S device HOT 2
- getCurrenButtonsCount typo HOT 3
- Maven is not packaging Robotium.jar into apk for testing??? HOT 4
- Sub-menu not displayed when clicking menu item HOT 8
- HorizontalScrollView scroll to right HOT 12
- enterText method works incorrect HOT 10
- Solo.clickOnMenuItem(String) closes menu if already open HOT 3
- is it possible to check whether menu items is enabled or not . HOT 5
- is it possible to search a string with more than 2 pages . HOT 2
- Add functionality to click on menu item text when number of menu items is more than six HOT 5
- Searching of text with special chars fails. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robotium.