Background auto Start Appium

Source: Internet
Author: User

First of all, I use the EXE way to install the appium.

Create a new. vbs file, write the following script, and remember to replace the D disk with your own drive letter.

1. The back taskkill seems to have no practical effect. Add it.

Set ws = CreateObject ("wscript.shell""d:\\appium\\node_modules\\ . bin\\appium.cmd && cmd/c start taskkill/im cmd.exe/f", vbhide

The 2.appium.cmd file can also be replaced with the Appium file in the same directory.

Set ws = CreateObject ("wscript.shell""d:\\appium\\node_modules\\ . bin\\appium && cmd/c start taskkill/im cmd.exe/f", vbhide

3. You can also start with the Appium node.exe run Main.js file, which can be followed by some initial properties.

Set ws = CreateObject ("wscript.shell""D:\Appium\node.exe d:\ Appium\node_modules\appium\lib\server\main.js--address 127.0.0.1--port 4723--platform-name Android-- Platform-version--automation-name Appium--log-no-color", vbhide

Of course you better check before starting the lower port is not occupied, the following code

1 defkill_process (self):2U" "Kill a process that occupies 5037 ports \ n3     " "          4     Try: 5PID = Os.popen ("Netstat-ano | findstr 5037| findstr LISTENING"). Read (). split () [-1]6Os.system ("taskkill/f/pid%s"%pid)7     exceptIndexerror as E:8         Print ' Portis not occupied'

Background auto Start Appium

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.