Git Product home page Git Product logo

Comments (5)

renas avatar renas commented on August 19, 2024

From [email protected] on April 16, 2010 07:19:26

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("");
        }
    });
}

from robotium.

renas avatar renas commented on August 19, 2024

From [email protected] on April 16, 2010 07:19:51

/**
* 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;
}

from robotium.

renas avatar renas commented on August 19, 2024

From [email protected] on April 19, 2010 11:29:33

Thanks for contributing. This will be included into the next release.

Status: Accepted
Labels: -Type-Defect Type-Enhancement

from robotium.

renas avatar renas commented on August 19, 2024

From [email protected] on April 29, 2010 02:20:35

Will be included in the next release.

Status: Started

from robotium.

renas avatar renas commented on August 19, 2024

From [email protected] on May 10, 2010 08:52:41

Status: Verified

from robotium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.