测试人社区

Appium-log-event

Log event

Store a custom event
//: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/session/events/log-event.yml)

Example Usage

// Java
CustomEvent evt = new CustomEvent();
evt.setEventName("funEvent");
evt.setVendor("appium");
driver.logEvent(evt);

# Python
driver.log_event('appium', 'funEvent')

// Javascript
// webdriver.io example
driver.logEvent('appium', 'funEvent')

// wd example
// WD code here

# Ruby
# ruby_lib example
driver.log_event vendor: 'appium', event: 'funEvent'

# ruby_lib_core example
@driver.logs.event vendor: 'appium', event: 'funEvent'
@driver.logs.event = { vendor: 'appium', event: 'anotherEvent' }

# PHP
// PHP Code here

// C#
// csharp Code here

Description

This API allows us to store a custom event.

Appium provides Appium Event Timing to track when events happen.
This custom event feature allow users to store a custom event as the feature.

Support

Appium Server

Platform Driver Platform Versions Appium Version Driver Version
iOS XCUITest 9.3+ 1.16.0+ All
UIAutomation 8.0 to 9.3 1.16.0+ All
Android Espresso ?+ 1.16.0+ All
UiAutomator2 ?+ 1.16.0+ All
UiAutomator 4.3+ 1.16.0+ All
Mac Mac ?+ 1.16.0+ All
Windows Windows 10+ 1.16.0+ All

Appium Clients

HTTP API Specifications

Endpoint

POST /session/:session_id/appium/log_event

URL Parameters

None

JSON Parameters

name type description
vendor string The name of vendor. It will be vendor in vendor:event.
event string The name of event. It will be event in vendor:event.

Response

null

See Also

官方链接为:http://appium.io/docs/en/commands/session/events/log-event