Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

feat: add score attribute for image element #396

Merged
merged 4 commits into from
Mar 21, 2020

Conversation

KazuCocoa
Copy link
Member

appium/appium#13883

Depends on appium/appium-support#169

After this change, we can get score image attribute like below:

  • client (Ruby)
image_element =  @@driver.find_element_by_image AppiumLibCoreTest.path_of('test/functional/data/test_ios_button.png')
=> #<Selenium::WebDriver::Element:0x4de9c1e10ffa87de id="appium-image-element-e3b9dd5b-0c26-47a7-838a-6d72d61f62e7">
> image_element.score
=> 0.9313163161277771
  • server
[HTTP] --> GET /wd/hub/session/97e811cd-d675-4f2c-a00e-ec79f5b1631b/element/appium-image-element-e3b9dd5b-0c26-47a7-838a-6d72d61f62e7/attribute/score
[HTTP] {}
[debug] [W3C (97e811cd)] Calling AppiumDriver.getAttribute() with args: ["score","appium-image-element-e3b9dd5b-0c26-47a7-838a-6d72d61f62e7","97e811cd-d675-4f2c-a00e-ec79f5b1631b"]
[debug] [XCUITest] Executing command 'getAttribute'
[debug] [W3C (97e811cd)] Responding to client with driver.getAttribute() result: 0.9313163161277771
[HTTP] <-- GET /wd/hub/session/97e811cd-d675-4f2c-a00e-ec79f5b1631b/element/appium-image-element-e3b9dd5b-0c26-47a7-838a-6d72d61f62e7/attribute/score 200 1 ms - 28
[HTTP]
[BaseDriver] Shutting down because we waited 120 seconds for a command
[Appium] Closing session, cause was 'New Command Timeout of 120 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'
[Appium] Removing session '97e811cd-d675-4f2c-a00e-ec79f5b1631b' from our master session list
[DevCon Factory] Releasing connections for F9F30814-75E5-45DD-98A5-5650B97E63D2 device on any port number
[DevCon Factory] Found cached connections to release: ["F9F30814-75E5-45DD-98A5-5650B97E63D2:8100"]
[debug] [DevCon Factory] Cached connections count: 0
[debug] [XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[debug] [IOSSimulatorLog] Stopping iOS log capture

@KazuCocoa KazuCocoa requested a review from jlipps March 21, 2020 09:17
@KazuCocoa KazuCocoa merged commit d8f3c83 into appium:master Mar 21, 2020
@KazuCocoa KazuCocoa deleted the add-score branch March 21, 2020 15:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants