from appium import webdriver File “build/bdist.macosx-10.12-x86_64/egg/appium
原因是包的版本不對應,senium版本3太高了,降爲2的就可以了
提示 “error: Permission to start activity denied”
其實是appActivity這個參數錯了
使用adb logcat ActivityManager:I *:s ->t.txt
adb logcat>/Users/maibixin/t.txt
查找關鍵字Displayed ,都可以找到appActivity關鍵字
需要注意的是Displayed會出現多次,需要找到第一個出現的(安卓每個頁面都有一個Activity,找進入程序的第一個)
提示 “TypeError: exceptions must be old-style classes or derived from BaseException, not unicode”
rf 移動端使用Click Button報錯,將Click Button修改承Click Element即可
提示 “FAIL : Keyword ‘AppiumLibrary.Click Element’ expected 1 argument, got 4.” RobotFramework的if else
Run Keyword If
… ELSE
ELSE需要四個字母都大寫,不然就會報上面的錯
RobotFramework的不能輸入中文
添加參數resetKeyboard=True unicodeKeyboard=True
在啓動?️(Open Application 方法後添加上面的兩個參數)
1. 啓動app
*** Settings ***
Library AppiumLibrary
*** Test Cases ***
email
Open Application http://localhost:4723/wd/hub platformName=Android platformVersion=6.0.1 deviceName=7c2fa057 appPackage=com.cx580.paludina appActivity=.functionModule.launch.view.SplashActivity
platformVersion:可以在手機上系統查看
deviceName:查看截圖(adb devices)
appPackage:查看截圖
appActivity:查看如下截圖
adb logcat ActivityManager:I *:s ->t.txt
adb logcat>/Users/maibixin/t.txt
查找Displayed關鍵字