手机自动化找对象的简要方法(未完待续)

#-*- coding:UTF-8 -*- ''' ''' import time from appium import webdriver descried_caps={} descried_caps["unicodeKeyboard"] = "True" descried_caps["resetKeyboard"] = "True" descried_caps['device']='2014813' descried_caps['platformName']='Android' descried_caps['deviceName']='...
appium | 2016-04-14 13:20 | 阅读 8872 次 | 评论 0 条

python 发送邮件

import smtplib from email.mime.text import MIMEText from email.MIMEMultipart import MIMEMultipart class SendEmailReporter(object): def SendMail(self,filename): sender = 'mobile@139.com' receiver = ['554646@qq.com','554646@qq.com'] subject = "test report"...
appium | 2016-04-12 15:39 | 阅读 9280 次 | 评论 0 条

appium 手机app测试数据分离(2)

import unittest,time from publicfunction import sendEmail n = sendEmail.SendEmailReporter() from publicfunction import PublicFunClass m = PublicFunClass.PublicFunClass() from publicfunction import readXml yang = readXml.denglu1() from publicfunction import sendReport k = sendReport.sendR...
appium | 2016-04-12 11:54 | 阅读 9993 次 | 评论 0 条

appium 手机app测试数据分离(1)

#-*- coding:UTF-8 -*- # ''' Created on 2016-4-8 @author: poptest ''' import time from appium import webdriver class PublicFunClass(object): def clickAct(self,getType,getValue): if getType == "id": return lee.find_element_by_id(getValue).click() ...
appium | 2016-04-12 11:53 | 阅读 9660 次 | 评论 0 条

appium class代码(封装click动作)

#-*- coding:UTF-8 -*- # ''' Created on 2016-4-8 @author: poptest ''' import time from appium import webdriver class PublicFunClass(object): def clickAct(self,getType,getValue): #将点击动作封装成def if getType == "id": return lee.find_element_by_id(getValue).click...
appium | 2016-04-08 21:17 | 阅读 10879 次 | 评论 0 条

appium class代码(参数为变量)

#-*- coding:UTF-8 -*- # ''' Created on 2016-4-8 @author: poptest ''' import time from appium import webdriver class PublicFunClass(object): def addgoodsaddress(self,userName,userTel,userAddr): time.sleep(3) #登陆进去,点击头像、 lee.fin...
appium | 2016-04-08 20:22 | 阅读 10413 次 | 评论 0 条

appium class代码(参数为固定值)

#-*- coding:UTF-8 -*- # ''' Created on 2016-4-8 @author: poptest ''' import time from appium import webdriver class PublicFunClass(object): def addgoodsaddress(self): time.sleep(3) #登陆进去,点击头像、 lee.find_element_by_id("com.subje...
appium | 2016-04-08 20:04 | 阅读 10863 次 | 评论 0 条

appium 线性代码

#-*- coding:UTF-8 -*- # ''' Created on 2016-4-8 @author: poptest ''' import time from appium import webdriver def addgoodsaddress(): time.sleep(3) #登陆进去,点击头像、 lee.find_element_by_id("com.subject.zhongchou:id/avatar_img").click() time.sleep(2) #点击地址 lee.f...
appium | 2016-04-08 18:46 | 阅读 10538 次 | 评论 0 条

mysql

----------------------------------- create table biao1( stid smallint(4) zerofill primary key auto_increment, stname varchar(20), sex char(5), area char(50) )charset utf8 insert into stubase(stid,stname,sex,area) values (0001,"李小龙","男","中国香港"); insert into biao1(stid,s...
mysql | 2016-04-02 15:29 | 阅读 10911 次 | 评论 0 条

python class train3

<?xml version="1.0" encoding="utf-8"?> <LoginData> <login001> <url1>http://192.168.242.128:8088/Tinyshop/</url1> <user>a@a.com</user> <passwd>123456</passwd> <type1>xpath</type1> <value1>.//*[@id='header']/div[1]/div/ul/li[1]/a</value1> ...
python | 2016-03-29 15:28 | 阅读 11439 次 | 评论 0 条

python class train 2

在used包中新建suckpy文件,次为被调py文件(函数库) #-*- coding:UTF-8 -*- # 解码方式 __author__ = 'suck' from selenium import webdriver class Login(): def BrowOpen(self,url): #定义浏览器登录动作 global bruce bruce = webdriver.Firefox() bruce.maximize_window() # max windows bru...
python | 2016-03-28 14:18 | 阅读 11765 次 | 评论 0 条

python lei

#-*- coding:UTF-8 -*- # 解码方式 __author__ = 'poptest' import unittest import time from selenium import webdriver class RegUser(unittest.TestCase): def setUp(self): global bruce bruce = webdriver.Firefox() #start firfox brower .bruce定义为火狐浏览器 bruce.ma...
python | 2016-03-27 18:40 | 阅读 11827 次 | 评论 1 条

python train2

#-*- coding:UTF-8 -*- # 解码方式 __author__ = 'poptest' import time from selenium import webdriver sh = webdriver.Firefox() from selenium.webdriver.common.action_chains import ActionChains def editinfor(): #点击收货地址 #sh.find_element_by_xpath(".//*[@id='header']/div[2]/div/div[...
python | 2016-03-25 15:52 | 阅读 11719 次 | 评论 0 条

python train1

#-*- coding:UTF-8 -*- # 解码方式 __author__ = 'pop' from selenium import webdriver # import time def testLogin(testname,testpassword,repass,revtype,realvalue): bruce = webdriver.Firefox() #start firfox brower .bruce定义为火狐浏览器 bruce.maximize_window() # max windows bruce.get...
python | 2016-03-25 15:43 | 阅读 11889 次 | 评论 0 条

python auto software test 2

注册7条case #-*- coding:UTF-8 -*- # 解码方式 __author__ = 'pop' from selenium import webdriver import time def testLogin(testname,testpassword,revtype,realvalue): bruce = webdriver.Firefox() #start firfox brower .bruce定义为火狐浏览器 bruce.maximize_window() # max window...
python | 2016-03-24 09:22 | 阅读 11371 次 | 评论 0 条

python auto software test 1

传参有返回 __author__ = 'pop' def add(c,d): s = c + d return s def sub(g,h): s = g - h return s def mul(m,n): s = m * n return s def mov(o,p): s = o / p return s a = input("please enter number") b = input("please enter next number") j ...
python | 2016-03-24 09:10 | 阅读 11314 次 | 评论 0 条

Delphi与timer[4]:使用SetTimer(3)——使用窗体Handle

unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) mmo1: TMemo; mmo2: TMemo; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sen...
默认分类 | 2014-05-12 00:00 | 阅读 47060 次 | 评论 0 条

delphi常用日期函数

uses DateUtils ●function DateOf(const AValue: TDateTime): TDateTime; 描述: 使用 DateOf 函数用来把一个 TDateTime 类型的变量转变成一个只带有日期的 TDateTime 类型变量。 例如: showmessage(DateTimetostr(dateof...
默认分类 | 2014-05-11 21:48 | 阅读 67535 次 | 评论 0 条

时间函数的声明。

时间函数在窗体中可以直接使用。如果是无窗体的还是需要声明,下面是实现对象。 program Project1; uses Messages, SysUtils,Dialogs; {$R *.res} function MyDateTime(StartDate, EndDate, Preaching: TDateTime): Boolean; begin Result:=false; if (Preaching>=StartDate)and(Preaching>=EndDate) then Result:=true; end;...
默认分类 | 2014-05-11 21:29 | 阅读 59991 次 | 评论 0 条

delphi实现进程监控。

program Project1; uses Windows, Messages, SysUtils, Dialogs, StdCtrls,Tlhelp32,shellapi; //DateUtils 用时间需要定义 {$R *.res} function CheckTask(ExeFileName: string): Boolean; //监视进程函数 const PROCESS_TERMINATE=$0001; var ContinueLoop: BOOL; FSnapshotHandle: THandle; FProcessEntry32: TPro...
编程点滴 | 2014-05-11 18:49 | 阅读 2907 次 | 评论 0 条
浏览2343929次