Skip to content

Commit

Permalink
Session: add isMobile option in server options when attaching to a se…
Browse files Browse the repository at this point in the history
…ssion
  • Loading branch information
allen-fang committed Nov 16, 2021
1 parent 5f15a0f commit cef8131
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/renderer/actions/Session.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,11 @@ export function newSession (caps, attachSessId = null) {
let driver = null;
try {
if (attachSessId) {
// When attaching to a session id, webdriver does not check if the device
// is mobile or not. Since we're attaching in appium-inspector, we can
// assume the device is mobile so that Appium protocols are included
// in the userPrototype.
serverOpts.isMobile = true;
driver = await Web2Driver.attachToSession(attachSessId, serverOpts);
driver._isAttachedSession = true;
} else {
Expand Down

0 comments on commit cef8131

Please sign in to comment.