Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3rd tvOS]tvos commands #151

Merged
merged 11 commits into from
Mar 26, 2019
Merged

[3rd tvOS]tvos commands #151

merged 11 commits into from
Mar 26, 2019

Conversation

KazuCocoa
Copy link
Member

@KazuCocoa KazuCocoa commented Mar 24, 2019

Final PR for #148 as implementing features for tvOS.
As WDA, we can handle tvOS via WDA after this PR.

We need to add tvOS support in xcuitest-driver.


curl -X GET http://localhost:8100/session/493E964A-FD36-4B34-9AF0-97698B0FE907/wda/element/focused # get a focused element

# After find element. e.g. 17000000-0000-0000-7E6D-000000000000
curl -X POST http://localhost:8100/session/493E964A-FD36-4B34-9AF0-97698B0FE907/element/6B030000-0000-0000-7E6D-000000000000/focuse -d '' # Work via inspector
curl -X GET http://localhost:8100/session/493E964A-FD36-4B34-9AF0-97698B0FE907/element/6B030000-0000-0000-7E6D-000000000000/focused # Work

# For compatibility of clients. Clients can get `focus` status as `get attribute` API
curl -X GET http://localhost:8100/session/493E964A-FD36-4B34-9AF0-97698B0FE907/element/6B030000-0000-0000-7E6D-000000000000/attribute/focused # Work

# Worked. We can click an element on TV.
# Users can do selecting action via `click` as same as iOS
curl -X POST http://localhost:8100/session/493E964A-FD36-4B34-9AF0-97698B0FE907/element/6B030000-0000-0000-7E6D-000000000000/click -d ''

hasFocus was only in tvOS. So I've added ifdef for tvOS again.
I'll add unit tests as next PR since it needs to add new test targets and test classes.


New endpoints

  • [[FBRoute GET:@"/element/:uuid/attribute/focused"] respondWithTarget:self action:@selector(handleGetFocused:)],
    • Get an attribute of 'focused'
  • [[FBRoute POST:@"/wda/element/:uuid/focuse"] respondWithTarget:self action:@selector(handleFocuse:)],
    • Set a focus to an element which is :uuid
  • [[FBRoute GET:@"/wda/element/focused"] respondWithTarget:self action:@selector(handleFindFocusedElement:)],
    • Get an element which is focused

@KazuCocoa
Copy link
Member Author

added New endpoints section in the description

@KazuCocoa KazuCocoa merged commit fb77c44 into appium:master Mar 26, 2019
@KazuCocoa KazuCocoa mentioned this pull request Mar 30, 2019
@KazuCocoa
Copy link
Member Author

@shvul
Hi, I would share this with you.
Your FB's tvOS support PR has been merged into appium fork with some modifications.
Thanks so much.
appium/appium-xcuitest-driver#911

@KazuCocoa KazuCocoa deleted the tvos-tv-commands branch March 30, 2019 06:44
@shvul
Copy link

shvul commented Mar 30, 2019

@KazuCocoa
Wow! That's amazing!
Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants