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

feat: add device action buttons and allow pausing of source refreshing #746

Merged
merged 12 commits into from
Apr 10, 2023

Conversation

JoelWhitney
Copy link
Contributor

Overview

I'm currently utilizing physical devices that are plugged into a Mac mini across the country. Periodically I will need to manually interact with these devices. Currently, this is very cumbersome using Appium inspector because there are no hardware buttons in the GUI and the page source/screenshot is refreshed every time a command is executed. To make device interactions more seamless, I would like to add some hardware buttons to the GUI and provide a way to pause page source refreshing. When coupled with a mjpeg stream, this makes interacting with devices more streamlined.

Changes made

  • Provides session capabilities to webdriver when attaching to session
  • Adds device actions for iOS: Home and Siri buttons
  • Adds device actions for Android: Home, Back, and Overview buttons
  • Adds button to pause page source refreshing
  • Gets mjpegScreenshotUrl from session capabilities if not explicitly provided in desired capabilities

iOS

ios

Android

android

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 23, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@JoelWhitney
Copy link
Contributor Author

I just saw this PR, which is somewhat related
#635

@jlipps
Copy link
Member

jlipps commented Mar 27, 2023

thanks for this contribution @JoelWhitney! will take a look soon

@jlipps
Copy link
Member

jlipps commented Mar 28, 2023

@JoelWhitney are you able to merge main so I can review knowing there are no conflicts?

@JoelWhitney
Copy link
Contributor Author

@jlipps looks like it's up to date, I merged main this morning

Copy link
Member

@jlipps jlipps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great! made a few small comments

app/renderer/actions/Inspector.js Outdated Show resolved Hide resolved
import InspectorStyles from './Inspector.css';
import { withTranslation } from '../../util';
import { HiOutlineMicrophone, HiOutlineHome } from 'react-icons/hi';
import { BiSquare, BiCircle } from 'react-icons/bi';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we not use icons from ant design, which are already included?

Copy link
Contributor Author

@JoelWhitney JoelWhitney Apr 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unable find icons in ant design that made sense for some of the Android buttons and the iOS Siri button. I tried to mix/match some ant design icons alongside the react icons and it looked a little odd.

Looking again at ant design...

  • There are no options for the iOS.Siri (no microphone), Android.Overview (no square), or Android.Home (no circle).
  • There are options for the iOS.Home (house), Android.Back (back arrow, no chevron), and I could probably use the house icon for Android.Home

app/renderer/util.js Outdated Show resolved Hide resolved
@JoelWhitney JoelWhitney changed the title Add device action buttons and allow pausing of source refreshing feat: add device action buttons and allow pausing of source refreshing Apr 6, 2023
@JoelWhitney
Copy link
Contributor Author

@jlipps thanks for reviewing. I added some comments above and pushed a commit to address some of the feedback. Let me know if you have suggestions for addressing the icon feedback

@jlipps
Copy link
Member

jlipps commented Apr 6, 2023

@JoelWhitney in that case I'm fine to keep the new icons. thanks! also I tried to merge in main but it looks like there are now more conflicts again, due to merging other PRs. do you mind fixing conflicts and pushing once more? then i'll be able to get this merged and published.

@JoelWhitney
Copy link
Contributor Author

@jlipps everything appears up to date. I fetched upstream and merged, which returned Already up to date.. I wasn't able to find any conflicts either, what conflicts did you see?

@jlipps jlipps merged commit 409df2e into appium:main Apr 10, 2023
@jlipps
Copy link
Member

jlipps commented Apr 10, 2023

sorry @JoelWhitney i had the merge button set to 'rebase' instead of 'squash' so it was showing as unrebasable due to conflicts. my fault!

shiva-guntoju pushed a commit to shiva-guntoju/appium-inspector that referenced this pull request Feb 2, 2024
appium#746)

* Add home and Siri button for iOS devices

* Add DeviceActions buttons for iOS and Android

* Get session details when attaching to session

* Revert interval change

* Update README.md

* Update package-lock.json

* Fix lint errors

* PR feedback

---------

Co-authored-by: Jonathan Lipps <jlipps@gmail.com>
laib3 pushed a commit to laib3/appium-inspector that referenced this pull request Nov 16, 2024
appium#746)

* Add home and Siri button for iOS devices

* Add DeviceActions buttons for iOS and Android

* Get session details when attaching to session

* Revert interval change

* Update README.md

* Update package-lock.json

* Fix lint errors

* PR feedback

---------

Co-authored-by: Jonathan Lipps <jlipps@gmail.com>
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.

2 participants