Open vaind opened 3 months ago
Sorry, I am confused.
driver.events.commands.filter { it.name == "activateApp" }
The above code snippet does not look like it is a java code
"commands": [
{
"cmd": "getLogEvents",
"startTime": 1723451304905,
"endTime": 1723451304905
},
{
"cmd": "execute",
"startTime": 1723451304936,
"endTime": 1723451312314
}
],
Not sure what is expected to be in this list. As far as I can see the type of a single event was always like that and did not change on the server side: https://github.com/appium/appium/blob/622b245ea38793280d9785a59a0416ce025862fe/packages/types/lib/driver.ts#L571
Before update (i.e. with appium java client v8.1.1), the output of print(driver.events)
was:
ServerEvents(commands=[CommandEvent(name=activateApp, startTimestamp=1723462917787, endTimestamp=1723462921607)], events=[TimedEvent(name=xcodeDetailsRetrieved, occurrences=[1723462914342]), TimedEvent(name=appConfigured, occurrences=[1723462914342]), TimedEvent(name=resetStarted, occurrences=[1723462914342]), TimedEvent(name=resetComplete, occurrences=[1723462914342]), TimedEvent(name=logCaptureStarted, occurrences=[1723462914694]), TimedEvent(name=simStarted, occurrences=[1723462914942]), TimedEvent(name=wdaStartAttempted, occurrences=[1723462916628]), TimedEvent(name=wdaSessionAttempted, occurrences=[1723462916633]), TimedEvent(name=wdaSessionStarted, occurrences=[1723462916640]), TimedEvent(name=wdaStarted, occurrences=[1723462916640])], jsonData={
so it was possible to filter by the actual command name.
Note: I've had to update drivers too so maybe it has something to do with those as well?
yes, it might be a result of a bugfix. activateApp
is not a "real" command. It is just a value of the script
argument in /execute
API. That is why the presence of execute
command is expected and correct. Having this argument reflected in the events history would be a separate feature.
Description
In previous versions of Appium, I've been able to collect timings of executed commands. After update to v9, the commands interface no longer contains the name of the executed command (nor any other information to use in filtering).
Environment
Details
Please provide more details, if necessary. The code that worked previously:
Currently, the commands interface doesn't have any useful identifier for commands triggered by drivers: