#-*- coding:utf-8 -*-
__author__ = 'poptest'
#考察句柄
from selenium import webdriver
import time
class Test12306Alert():
def testBrowser12306(self):
dr= webdriver.Firefox()
#窗口最大化
dr.maximize_window()
#输入12306网址
dr.get("http://www.12306.cn/mor...
【TMQ(腾讯移动品质中心)是腾讯最早专注在移动APP测试的团队,网站专注于移动测试技术精华,饱含腾讯多款亿级APP的品质秘密,文章皆独家原创,我们不谈虚的,只谈干货!】
阅读原文欢迎访问TMQ官网
网上流传一句话:世界上最难的事有两件,一是把自己的思想装进别人的脑袋,二是把别人的钱装进自己的口袋。当然后来又有神续:前者成功的是老师,后者成功的是老板,两者都成功的是寺庙。当然这是开玩笑,说这个是为了引入我们今天的话题:缺陷分析。
作为测试工程师,最常接触的就是各种缺陷,如何将缺陷变废为宝,对今后的测试工作产生指导价值,这是我们...
#include <iostream>
using namespace std;
int main()
{int i=0,max,min,m=0,n=0,t,r;
int a[10];
for(i=0;i<10;i++)
{
cin>>a[i];
static int max=min=a[0];
if(a[i]>max)
{
max=a[i];
m=i;}
if(a[i]<min)
{min=a[i];
...
#-*- coding:UTF-8 -*-
'''
Created on 2016-4-12
@author: poptest
'''
from xml.dom import minidom
class ReadXMLDriver():
def readXmlData(self,filename,elementfirstnode,num,elementsecondnode):
#找xml的路径
dom = minidom.parse('../ShopDateModel/'+filename)
...
谁有C#的C/S 实例,分享一份谢谢!
万分感谢!
#-*- 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']='...
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"...
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...
#-*- 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()
...
#-*- coding:UTF-8 -*-
'''
Created on 2016-4-11
@author: poptest
'''
import time
from appium import webdriver
class CommonFunction(object):
#封装点击动作(文本类型,文本值)
def clickAct(self,getType,getValue):
if getType == "id":
return dr.find_element_by_id(getV...
#-*- coding:UTF-8 -*- #
'''
Created on 2016-4-8
@author: poptest
'''
import time
from appium import webdriver
class CommonFunction(object):
#接收用户名、电话、地址
def addgoodsaddress(self,revName,revTel,revAddr):
time.sleep(3)
#点击头像、登陆进去
dr.find_element...
#-*- coding:UTF-8 -*- #
'''
Created on 2016-4-8
@author: poptest
'''
import time
from appium import webdriver
class CommonFunction(object):
def addgoodsaddress(self):
time.sleep(3)
#点击头像、登陆进去
dr.find_element_by_id("com.subject.zhongchou:id/ava...
#-*- 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...
#-*- 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...
#-*- 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...
#-*- 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...
#-*- coding:UTF-8 -*- #
'''
Created on 2016-4-8
@author: poptest
'''
import time
from appium import webdriver
def addgoodsaddress():
time.sleep(3)
#点击头像、登陆进去
dr.find_element_by_id("com.subject.zhongchou:id/avatar_img").click()
time.sleep(2)
#点击收货地址
dr.fi...
1.变量生存周期
一旦在程序中定义变量,计算机在执行过程中就会根据变量的类型分配相应的内存单元供变量保存数据。
只有当函数被调用时,其形参和局部变量才被分配相应存储单元,一旦调用结束,相应的存储单元由系统收回。由于这种特性,局部变量还被称为自动变量。
变量从定义开始分配存储单元,到运行结束存储单元被回收,整个过程称为变量生存周期。
2.变量存储的内存分布
由于自动变量和全局变量的生存周期不同,为了便于计算机存储管理,C语言把保存所有变量的数据区分为动态存储区(使用堆栈进行管理),静态存储区(相对固...
php没有内置相关函数,可以自己定义函数实现。
1、最直观最容易理解的方法:
<?php
$a1 = [1,2,3,4,5];
$a2 = [2,4,6];
function array_minus($a1, $a2)
{
$new_a = [];
foreach ($a1 as $e) {
if (!in_array($e, $a2)) {
$new_a[] = $e;
}
}
return $new_a;
}
print_r(array_minus($a1, $a2));
2、用差集和交集实现:
<?...
public class Httpthread extends Thread{
String url;
WebView webView;
Handler handler;
public Httpthread(String url, WebView webView,Handler handler){
this.url=url;
this.webView=webView;
this.handler=handler;
}
public void run(){
try {
URL httpUrl=new URL(url);
t...