开发者

To click on Button android automation

开发者 https://www.devze.com 2023-03-12 09:41 出处:网络
I\'m using robo开发者_JS百科tium to create an android automation, Here\'s my code for the button

I'm using robo开发者_JS百科tium to create an android automation, Here's my code for the button

         <Button
        android:id="@+id/buttonA"
        android:layout_height="wrap_content"
        android:textSize="16sp"
        android:textStyle="bold"
        android:layout_below="@+id/password"
        android:layout_centerHorizontal="true"
        android:text="@string/log_in"
        android:layout_width="wrap_content"
        android:minWidth="150px">
    </Button>

And using

solo.clickOnButton("log_in") 

but it seems that it doesn't click on the button at all

log_in stands for Login button in android(ie the strings.xml), i 've did the Calculator app and the Calculator test;its working and clicking on the button Multiply, and what i can see is that if we want to click on a button we use solo.clickOnButton("Multiply") Multiply is a text,thus why i'm using log_in. Did the same thing with my button and it doesn't work is there a workaround for this?

0

精彩评论

暂无评论...
验证码 换一张
取 消