Class: Maze::Client::Appium::LocalClient
Constant Summary
Constants inherited
from BaseClient
BaseClient::FIXTURE_CONFIG
Instance Method Summary
collapse
Methods inherited from BaseClient
#attempt_start_driver, #handle_error, #initialize, #maze_address, #start_driver, #start_scenario, #start_session
Instance Method Details
#device_capabilities ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/maze/client/appium/local_client.rb', line 11
def device_capabilities
config = Maze.config
platform = Maze::Helper.get_current_platform
capabilities = case platform
when 'android'
{
'platformName' => 'Android',
'automationName' => 'UiAutomator2',
'autoGrantPermissions' => 'true',
'noReset' => 'true'
}
when 'ios'
{
'platformName' => 'iOS',
'automationName' => 'XCUITest',
'deviceName' => config.device_id,
'xcodeOrgId' => config.apple_team_id,
'xcodeSigningId' => 'iPhone Developer',
'udid' => config.device_id,
'noReset' => 'true',
'waitForQuiescence' => false,
'newCommandTimeout' => 0
}
when 'macos'
{
'platformName' => 'Mac'
}
else
raise "Unsupported platform: #{config.os}"
end
common = {
'app' => config.app,
'os' => platform,
'autoAcceptAlerts': 'true'
}
capabilities.merge! common
capabilities.merge! JSON.parse(config.capabilities_option)
capabilities
end
|
#log_run_intro ⇒ Object
55
56
57
|
# File 'lib/maze/client/appium/local_client.rb', line 55
def log_run_intro
end
|
#log_run_outro ⇒ Object
59
60
61
|
# File 'lib/maze/client/appium/local_client.rb', line 59
def log_run_outro
end
|
#prepare_session ⇒ Object
5
6
7
8
9
|
# File 'lib/maze/client/appium/local_client.rb', line 5
def prepare_session
appium_uri = URI(Maze.config.appium_server_url)
Maze::AppiumServer.start(address: appium_uri.host, port: appium_uri.port.to_s) if Maze.config.start_appium
end
|
#retry_start_driver? ⇒ Boolean
51
52
53
|
# File 'lib/maze/client/appium/local_client.rb', line 51
def retry_start_driver?
false
end
|