Python 怎样启动远程的QTP?
Python 怎样启动远程的QTP,然后执行某个路径下的TEST ?
VB可以这样:
Set qtApp = CreateObject("QuickTest.Application", "192.168.0.102")
qtApp.Launch
qtApp.Visible = True
Dim qtTest
qtApp.Open "\\192.168.0.102\Users\Administrator\Desktop\Test3", True
qtApp.Test.Run
Python只能启动本地的QTP
qtp = win32com.client.Dispatch('QuickTest.Application')
qtp.Launch()
qtp.Open("D:\\CDoc\\qtpTest\\Test1")
pythoncom.CoCreateInstanceEx('{2B9B8E92-EBAA-44AF-A23C-9FBD08EAFA54}', None , 0 , ('192.168.0.2', None, 0,0) , 'IID?这里输入什么东西?' )
相关问答:
在list中添加一个类的局部变量 这样做是否合法 请看下面例子:
Python code:
class A():
def __init__( self ):
self.__a = 0
self.__b = 'hello'
def get_a( self ):
ret ......
return func 与return func()
有什么不同的?
return func返回的是一个函数对象,
return func()返回的是func()函数的返回结果。
楼上正解
一个是返回变量 一个是返回的时候 再调用一下func函数
我觉得是 ......
python 核心编程(第二版) 中 ,11.8.4 闭包有个例子
def counter(start_at=0):
count = [start_at]
def incr():
count[0] += 1
return count[0]
return incr
难道其中count[] ......
代码如下:
import os
import time
source = [r'e:\python',r'e:\temp']
#print(source)
print('源:')
for spath in source:
print(spath)
tar ......