Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I know what exactly Droidbot did to the phone at any given time? #140

Open
HongheZ opened this issue Mar 21, 2022 · 13 comments
Open

Comments

@HongheZ
Copy link

HongheZ commented Mar 21, 2022

Hello, may I ask after running Droidbot, how do I know what Droidbot is doing to my phone at any given time? For example, if Droidbot cliacks a button, I want to know the button name and the date and time of this operation. I read user_input.txt, it seems only record the click operation happend, but does not record other details, such as the name of the button being clicked. Is there any other way I can get this information?

@ThePearhead
Copy link

ThePearhead commented Mar 30, 2022

Hi,
take a look at the index.html in your browser.
There you see the UTG, where one node represents a screen/activity and the edges represent the action, which was performed between the activities. When you click on the edge, you should see which button was clicked.
I hope this helps!

Edit: unfortunately, date and time aren't recorded in the UTG

@HongheZ
Copy link
Author

HongheZ commented Mar 31, 2022

Hello, thank you so much for your reply! After I read the UTG, I have another question. In the command, I set the DroidBot to create 100 count event. However, in the UTG, I only see 38 edges(actions). What is the reason for this?

@ThePearhead
Copy link

Hi,
I'm not completely sure about this, but I think that's the case when the same action which led to a specific activity is performed more than once. In this case, the edge is labeled with more than one number: e.g. "21, 73" on the edge means that event no. 21 and 73 performed the same action between the same activities.
The counter in the UTG isn't increased, when the edge for this action is already present.

@HongheZ
Copy link
Author

HongheZ commented Mar 31, 2022

Thanks! And for UTG, is there a way to merge nodes with the same activity name into one and remove the extra edge? Which file I need to edit?

@ThePearhead
Copy link

ThePearhead commented Apr 1, 2022

The file for the UTG should be utg.js, which is also in your output directory.
I'm not sure if this will work - I tried it and simply deleted some nodes in utg.js and the UTG shown in my browser via index.html looked weird after that (all edges were gone). I think that was because the changes I made caused some inconsistency in the UTG. But with more exact changes, it could work!

@HongheZ
Copy link
Author

HongheZ commented Apr 3, 2022

Got it. Thank you so much!

@HongheZ
Copy link
Author

HongheZ commented Apr 5, 2022

Hello! May I ask another question? The number on the edge of the UTG is the serial number of the event that the model created, is it right? But why are some of the numbers on the edges the same? For example, in one UTG I generated, there were two edges with serial number 17. But they represent two different events, one is clicking the button to jump to another interface, and the other is clicking the back button to jump back.

@ThePearhead
Copy link

Hi!
I'm no developer of droidbot (i just used it pretty much in the last weeks), so I'm not sure if I can help you with this question.
But when I look at my utgs I see the same behaviour - I never noticed that. But it's only when Droidbot leaves the app; one node is the homescreen. Perhaps because droidbot leaves the app, it doesn't count as an event? Just a guessing.
Would be interesting in what cases you have those double-numbered edges - is it also only when Droidbot leaves your tested app?

@HongheZ
Copy link
Author

HongheZ commented Apr 6, 2022

Eh, no. Sometimes when it click button to jump one activity to another activity within the one app, it still has double-numbered edges.

@HongheZ
Copy link
Author

HongheZ commented Apr 6, 2022

Thank you so much all the same. I will have more try to figure it out.

@ThePearhead
Copy link

Eh, no. Sometimes when it click button to jump one activity to another activity within the one app, it still has double-numbered edges.

Hmmm, okay, that was the only idea i had for this. I'll look at my future utgs closer, perhaps I'll find another reason for this behaviour (or it's just a bug).

Thank you so much all the same. I will have more try to figure it out.

You're welcome! :)

@ThePearhead
Copy link

I took a closer look at my utgs and noticed some things (note: i always used 100 events, with different policies):

utg.js is the file for the UTG you see in index.html. at the end of this file, there is an interesting information, which isn't shown in index.html: num_effective_events
Mostly I have something betwenn 70-80 effective events. An "ineffective" event could be Droidbot clicking on a component (e.g. a TextView), which doesn't affect the UI. This explains also, why we never have 100 edges or nodes. It seems clear now, but I didn't think of this at first.
It would be great if this information would be shown in index.html.

Also, sometimes edges seem to be missed: e.g. edge no. 8 goes to a node, and the next edge to another node is labeled with 12 - 9, 10 and 11 are missing! This could also be caused by "ineffective" events.

I also noticed a bug in the cluster structure and cluster activity (which is also shown in index.html): in some utgs the nodes have the wrong screenshots linked, from another activity.

But: I still have no new idea for the problem with the same label...

@HongheZ
Copy link
Author

HongheZ commented Apr 7, 2022

These infromation is useful, thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants