App Automation test application (Baidu app simple test)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.