Support for log_event and get_events command#469
Support for log_event and get_events command#469ki4070ma merged 15 commits intoappium:masterappium/python-client:masterfrom ki4070ma:fix-eventsCopy head branch name to clipboard
Conversation
|
I am ok with the PR, although I would like @dpgraham to check it before merging, since it might be a breaking one |
| class LogEvent(webdriver.Remote): | ||
|
|
||
| @property | ||
| def events(self): |
There was a problem hiding this comment.
https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L589-L594
/events route accepts type argument as option.
It hasn't been implemented yet, but this events should not be property.
You can rename here as get_events(self, type = None) to keep another events as session_capability['events']. It is for backword compatibility as #469 (comment)
There was a problem hiding this comment.
@KazuCocoa
Thanks, I misunderstood, I will keep original events and create get_events as another one.
It isn't implemented yet for now
| startTime: (int) Received time | ||
| endTime: (init) Response time | ||
| """ | ||
| return self.execute(Command.GET_EVENTS)['value'] |
There was a problem hiding this comment.
As a client, below two cases are available
self.execute(Command.LOG_EVENT, {})
self.execute(Command.LOG_EVENT, {'type': nil}) (<= Appium server will handle this 'type' to filter events)
There was a problem hiding this comment.
Yes, I've checked and added, but removed by below commit since it isn't implemented yet.
In my opinion, it's enough to add type when it's ready.
However, I'll restore type along to your comments. Any other comments are welcome.
There was a problem hiding this comment.
It could depend on server-side if the parameter works.
We can handle the behaviour only server-side modification (and documentation on appium.io), if clients follow the route definition like other commands.
The value isn't passed to the server for now.
|
Added |
For appium/appium#13568