Giter VIP home page Giter VIP logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 15, 2024
Thanks for this. This will be fixed in the next release.

Original comment by [email protected] on 7 Dec 2010 at 10:20

  • Changed state: Accepted

from robotium.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 15, 2024
This issue has been resolved in Robotium 2.0

Original comment by [email protected] on 7 Dec 2010 at 7:37

  • Changed state: Verified

from robotium.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 15, 2024
While the KeyCode of Solo.LEFT has been changed, the function does not provide 
the possibility to perform mySolo.sendkey(KeyEvent.KEYCODE_HOME).

Maybe changing the following procedure in Solo like that:

    public void sendKey(int key)
    {
        switch (key) {
            case RIGHT:
                robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_DPAD_RIGHT);
                break;
            case LEFT:
                robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_DPAD_LEFT);
                break;
            case UP:
                robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_DPAD_UP);
                break;
            case DOWN:
                robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_DPAD_DOWN);
                break;
            case ENTER:
                robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_ENTER);
                break;
            case MENU:
                robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_MENU);
                break;
            case DELETE:
                robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_DEL);
                break;
            default:
                try {
                    robotiumUtils.sendKeyCode(key);
                } catch (Exception e) {
                    // TODO: handle exception
                }
                break;
        }
    }


Original comment by [email protected] on 17 Dec 2010 at 9:32

from robotium.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 15, 2024
Thanks for this, I have updated sendKey now.

Original comment by [email protected] on 28 Dec 2010 at 8:52

from robotium.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 15, 2024
Unless I am wrong this issue has reappeared in version 2.1 

A manual click in the emulator works fine.
Using robotium with 
    solo.sendKey(KeyEvent.KEYCODE_HOME); 
does not take the application to Home screen 

Original comment by [email protected] on 16 Feb 2011 at 9:52

from robotium.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 15, 2024
Setup for Comment 5:
Using Android 2.2
OS: Ubuntu Linux 10.04 in a VirtualBox 3.2.12 hosted on Windows 7

Original comment by [email protected] on 16 Feb 2011 at 9:56

from robotium.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 15, 2024
No, it has not reapeared. Its not for sure that KEYCODE_HOME does take one to 
the homescreen. If you e.g. try solo.sendKey(KeyEvent.KEYCODE_VOLUME_UP) or any 
other KeyEvent that is working fron an application point of view you will see 
that it works.

Original comment by [email protected] on 16 Feb 2011 at 10:01

from robotium.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 15, 2024
Sorry for bothering but why is not guaranteed that KEYCODE_HOME takes you to 
the Home screen ?

From the API documentation  one can read that KEYCODE_HOME is never delivered 
to the application, is this the problem?

-------------------snip---------------------------------
public static final int KEYCODE_HOME
Since: API Level 1

Key code constant: Home key. This key is handled by the framework and is never 
delivered to applications.
Constant Value: 3 (0x00000003
-------------------/snip----------------------------------

Original comment by [email protected] on 16 Feb 2011 at 10:24

from robotium.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 15, 2024
I asked about this here:
http://stackoverflow.com/questions/25184160/android-instrumentation-home-button

Original comment by [email protected] on 7 Aug 2014 at 1:47

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.