Self-booting Appium service in Python program

Source: Internet
Author: User
Tags appium

General boot Appium Service method:Open cmd, Run command: #>appium-a 127.0.0.1-p 4723 When the program outputs such as information, indicating that the Appium started successfully, it can be run at this time TestThe script. Write UI Automation using the Appium framework Test Cases, always need to start appium service, it is too troublesome, so I added a self-initiated Appium service in the project small function, share with you, do not like to spray. 1. Create bat file Startappiumserver.bat@echo off
Title Startappiumservercmd/c "appium-a 127.0.0.1-p 4723" 2. Create bat file Stopappiumserver.bat@echo off
Title stopappiumserver
Tasklist  /v|find  if %errorlevel%==0  (
::appium "Windowtitle eq startappiumserver"
) taskkill/f/fi "windowtitle eq stopappiumserver" 3, put Startappiumserver.bat and Stopappiumserver.bat in the project catalogAdd the following code before you begin executing the test case code: Os.system (' Start Startappiumserver.bat ') # Start appium service Time.sleep (8) # wait for appium service to start After executing the test case code, add the following code: Os.system (' Start Stopappiumserver.bat ') # Close appium service

Self-booting Appium service in Python program

Related Article

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.