Private Sub UserForm_Initialize()
Call CreateDictFromColumns("Schedule", "A", "B")
Dim dic As Dictionary
Set dic = createdDic
For Each k In dic.Keys
MsgBox dic(k)
Next
With ListBox1
.AddItem "test"
End With
End Sub
'http://stackoverflow.com/questions/33523658/what-is-the-easiest-way-to-take-two-columns-of-data-and-convert-to-dictionary
Function CreateDictFromColumns(sheet As String, keyCol As String, valCol As String) As Dictionary
Dim aDict As Dictionary
Set aDict = New Dictionary
Dim rng As Range: Set rng = Sheets(sheet).Range(keyCol & ":" & valCol)
Dim i As Long
Dim lastCol As Long '// for non-adjacent ("A:ZZ")
lastCol = rng.Columns.Count …Run Code Online (Sandbox Code Playgroud) 我最近接手了一个使用Appium进行自动移动测试的项目。我有一些应该与Appium一起运行的python脚本,但是当尝试运行它们时,我遇到了“ [INSTALL_FAILED_VERSION_DOWNGRADE]”。经过对此事的大量研究,我认为这是与Android相关的问题,它是APK版本。但是,我是Android的新手,因此要完全了解Appium和Android所做的工作就很困难。在尝试将应用程序安装到设备上时,我更倾向于解决问题,但是我觉得我已经解决了排除故障的步骤。一些示例可确保我拥有该应用程序的最新版本,卸载该应用程序,重新安装该应用程序的较旧版本并最终检查更新。
Python脚本回溯:
Traceback (most recent call last):
File "main.py", line 310, in <module>
launch()
File "main.py", line 26, in launch
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
File "C:\Python\lib\site-packages\appium\webdriver\webdriver.py", line 36, in __init__
super(WebDriver, self).__init__(command_executor, desired_capabilities, browser_profile, proxy, keep_alive)
File "C:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 151, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 240, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 308, in execute
self.error_handler.check_response(response)
File "C:\Python\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: A new session could …Run Code Online (Sandbox Code Playgroud)