小编Ram*_*Ram的帖子

如何跳过 Chrome 欢迎屏幕,每次运行 Appium 时,Ruby 测试

我是 Appium 的新手。所以我的要求是在模拟器中通过 Appium 运行 Web 驱动程序测试,但是当我每次运行时 chrome 总是显示欢迎屏幕,我必须手动跳过该屏幕才能查看测试结果并截取屏幕截图。如何跳过chrome欢迎屏幕?

下面是我的设置 Appium 1.5.3 Mobile platform/version under test: Android 7.1 Real device or emulator/simulator: Emulator

这是我的 env.rb 文件中的内容

begin
  system 'adb uninstall io.appium.settings'
  system 'adb uninstall io.appium.unlock'
  $driver = Appium::Driver.new(desired_caps).start_driver
rescue Exception => e
  puts e.message
  Process.exit(0)  
 end
else # else create driver instance for desktop browser
 begin
   $driver = Selenium::WebDriver.for(:"#{$browser_type}")
   $driver.manage().window().maximize()
 rescue Exception => e
   puts e.message
   Process.exit(0)
 end
end
Run Code Online (Sandbox Code Playgroud)

ruby android appium

5
推荐指数
1
解决办法
2391
查看次数

标签 统计

android ×1

appium ×1

ruby ×1