In the Baidu app search python related content code is as follows:
From appium Import webdriverdesired_caps = {}desired_caps[' devicename '] = ' 621qecq23dkqp ' desired_caps[' platformname '] = ' Android ' desired_caps[' platformversion ' = ' 6.0 ' desired_caps[' apppackage '] = ' com.baidu.searchbox ' desired_caps[' Appactivity '] = '. Splashactivity '
#下面这个是百度二次启动的activitydesired_caps [' appwaitactivity '] = '. Mainactivity ' desired_caps[' unicodekeyboard '] = ' true ' desired_caps[' resetkeyboard '] = ' true ' desired_caps[' Automationname '] = ' selendroid ' driver = webdriver. Remote (' Http://127.0.0.1:4723/wd/hub ', desired_caps)
#点击搜索框driver. find_element_by_id (' Baidu_searchbox '). Click ()
#在搜索框中输入pythondriver. find_element_by_id (' Searchtextinput '). Send_keys (' python ')
#点击查询driver. find_element_by_id (' Float_search_or_cancel '). Click () driver.quit ()
See if it feels like the app test is simple? In fact, this is the simplest example, the actual automated testing process will encounter a variety of problems, only be good at summing up, have good ideas to solve problems can really learn things
App Automation test application (Baidu app simple test)