We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef9cc99 commit f2122deCopy full SHA for f2122de
lib/appium_lib/ios/helper.rb
@@ -531,11 +531,13 @@ def _by_json opts
531
# will be present.
532
_validate_object opts[:name], opts[:label], opts[:value]
533
534
+ # note that mainWindow is sometimes nil so it's passed as a param
535
+ # $._elementOrElementsByType will validate that the window isn't nil
536
element_or_elements_by_type = <<-JS
537
(function() {
- var opts = #{opts.to_json}
538
+ var opts = #{opts.to_json};
539
- return $.mainWindow()._elementOrElementsByType(opts);
540
+ return $._elementOrElementsByType($.mainWindow(), opts);
541
})();
542
JS
543
0 commit comments