File tree 2 files changed +11
-11
lines changed
2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -403,4 +403,15 @@ def xml_values target
403
403
def resolve_id id
404
404
mobile :resolveId , id
405
405
end
406
+
407
+ # Lists package, activity, and adb shell am start -n value for current app.
408
+ # Works on local host only (not remote).
409
+ def current_app
410
+ line = `adb shell dumpsys window windows` . each_line . grep ( /mFocusedApp/ ) . first . strip
411
+ pair = line . split ( ' ' ) . last . gsub ( '}' , '' ) . split ( '/' )
412
+ OpenStruct . new line : line ,
413
+ package : pair . first ,
414
+ activity : pair . last ,
415
+ am_start : pair . first + '/' + pair . last
416
+ end
406
417
end # module Appium::Android
Original file line number Diff line number Diff line change @@ -216,15 +216,4 @@ def find_names name
216
216
def tag tag_name
217
217
find_element :tag_name , tag_name
218
218
end
219
-
220
- # Lists package, activity, and adb shell am start -n value for current app.
221
- # Works on local host only (not remote).
222
- def current_app
223
- line = `adb shell dumpsys window windows` . each_line . grep ( /mFocusedApp/ ) . first . strip
224
- pair = line . split ( ' ' ) . last . gsub ( '}' , '' ) . split ( '/' )
225
- OpenStruct . new line : line ,
226
- package : pair . first ,
227
- activity : pair . last ,
228
- am_start : pair . first + '/' + pair . last
229
- end
230
219
end # module Appium::Common
You can’t perform that action at this time.
0 commit comments