Issue
I'm working with the android uiautomtor and I want to confirm Pop-Up-Windows like Bluetooth Requests. The Pop-Up appears when I want to turn on the bluetooth visibility. Then I have to confirm it by pressing the button with the text "YES". I call the method of the uiautomator by using the command line from a PC and it works as well!
I use this Code:
UiObject obj;
boolean success;
obj = new UiObject(new UiSelector().text("YES"));
success = obj.click();
This code is working in a test automation for testing the UI of an android device. So the programm, which calls the method, runs for long time and i want to know if the button was clicked correctly or not. The click()-Method returns true if the ID of the UI-Object was found. I need the return value for analyze the tests.
So here is my question:
Is it possible to return/send the boolean value of the click()-Method from the uiautomator testcase class to the command line?
Solution
If you would only want to see the value of "success", you could use:
system.out.println("success = " + success);
It's not clear to me if you want to further use this value in some other parts of your program.
Answered By - Gabriel Porumb
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.