我试图让我的测试使用上限自动授予权限,但是总是在尝试时都会出现InvalidArgumentError。我该怎么解决?
我正在尝试:
SELECT Name1 AS Name, Department1 AS Department, Location1 AS Location FROM yourTable
UNION ALL
SELECT Name2, Department2, Location2 FROM yourTable;
错误:
require 'rubygems'
require 'em/pure_ruby'
require 'appium_lib'
require 'eventmachine'
require 'selenium-webdriver'
caps = {}
caps["app"] = "C:/apk/Pb_debug_4.1.19-DEBUG1-20190416T143413Z-001/Pb_debug_4.1.19-DEBUG1/Pb_debug_4.1.19-DEBUG.apk"
caps["platformName"] = "Android"
caps["platformVersion"] = "7.0"
caps["deviceName"] = "EMULATOR29X0X6X0"
caps["autoAcceptAlerts"] = "True"
caps["newCommandTimeout"] = "3600"
caps["deviceReadyTimeout"] = "3600"
caps["automationName"] = "UiAutomator2"
caps["autoGrantPermissions"] = "True"
我真的不知道该怎么办。感谢您的关注。
答案 0 :(得分:2)
只需更改此:
caps["autoGrantPermissions"] = "True"
收件人:
caps["autoGrantPermissions"] = true
答案 1 :(得分:0)
您在双引号内使用True,这就是为什么将其视为字符串而不是布尔值的原因。您应该尝试将caps["autoGrantPermissions"] = "True"
更改为caps["autoGrantPermissions"] = true
。