adb shell input text abc #输入abc ,但是没有确认,只是输入
adb shell input keyevent KEYCODE_ENTER # 回车行
adb shell input swipte 50 250 250 250 500 #500是毫秒
adb shell input tap 50 250 #点50 250点
package fuck;
public class SamM
{
public static void main(String[] args)
{
String string =5 >3 ? "5 more than 3" :"5 less than 3";
System.out.println(string);
Lexus();
Audi();
}
public static void Cadillac()
{
if (5 >3)
{
System.out.println("5 larger t...
python request
公司 | 2016-10-12 15:31:41 | 63540次阅读 | 0评
#-*- coding:UTF-8 -*- #
import sys, unittest, xmlrpclib, time, socket, select, multiprocessing , random,sqlite3,re,unicodedata,requests,time,json
from main import database
import esl_init
from main import create_task_data
from Simp...
mysql> select @id:=stid from c where stid='1';
+-----------+
| @id:=stid |
+-----------+
| 1 |
+-----------+
1 row in set (0.04 sec)
----------------------------------------------
mysql> delete from s where id=@id;
Query OK, 1 row affected (0.08 sec)
mysql> select * from s;
...
<?xml version="1.0" encoding="UTF-8"?>
<LoginDate>
<Login001>
<URL>http://192.168.90.128/tinyshop/</URL>
<name1>222@qq.com</name1>
<password1>111111</password1>
<!-- 实际的类型-->
<type>xpath</type>
<!--实际 -->
<value1>.//*[@id='he...
#-*- coding:UTF-8 -*- # 解码方式
__author__ = 'poptest'
import time,unittest
from selenium import webdriver
class CommomFunction(object):
def browserInit(self,revUrl):
global driver
driver = webdriver.Firefox()
driver.get(revUrl)
driver.maximize_window()
...
#-*- coding:utf-8 -*-
__author__ = 'poptest'
#考察句柄,Alert弹框
from selenium import webdriver
import time
class Test12306Alert():
def testBrowser12306(self):
dr= webdriver.Firefox()
#窗口最大化
dr.maximize_window()
#输入12306网址
dr.get("http://www.1230...
#-*- coding:UTF-8 -*- # 解码方式
__author__ = 'poptest'
import time,unittest
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
class TestAddressModel(unittest.TestCase):
def setUp(self):
global dr
dr = webdriver.Firefox(...
#-*- coding:UTF-8 -*-
import time,unittest
from selenium import webdriver
class TestRegistModel(unittest.TestCase):
def setUp(self):
global dr
dr = webdriver.Firefox()
dr.get("http://192.168.90.128/tinyshop/")
time.sleep(2)
dr.maximize_win...
#-*- coding:UTF-8 -*-
import time
from selenium import webdriver
import unittest
import traceback
class TestLoginModle(unittest.TestCase):
def setUp(self):
global driver
driver = webdriver.Firefox()
driver.get("http://192.168.90.128/tinyshop/")
driv...
#-*- 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...
#-*- 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)
...
#-*- 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
def addgoodsaddress():
time.sleep(3)
#点击头像、登陆进去
dr.find_element_by_id("com.subject.zhongchou:id/avatar_img").click()
time.sleep(2)
#点击收货地址
dr.fi...
#-*- coding:UTF-8 -*-
__author__ = 'poptest'
import time
import unittest
from selenium import webdriver
class RegUserModel(unittest.TestCase):
def setUp (self):
global drive
#打开火狐浏览器
drive = webdriver.Firefox()
#窗口最大化,显示所有对象
drive.maximize_...
#-*- coding:utf-8 -*-
__author__ = 'poptest'
#考察句柄
from selenium import webdriver
import time
import sys
def main():
#打开火狐浏览器
dr= webdriver.Firefox()
#窗口最大化
dr.maximize_window()
#输入12306网址
dr.get("http://www.12306.cn/mormhweb/")
# 定义当前窗口句柄1
cuhan...
#-*- coding:utf-8 -*-
__author__ = 'poptest'
#考察去掉只读属性
import time
from selenium import webdriver
def main():
#打开火狐浏览器
dr = webdriver.Firefox()
#窗口最大化
dr.maximize_window()
#输入往返地址
dr.get("https://kyfw.12306.cn/otn/leftTicket/init")
#点击往返
dr.find_ele...
#-*- coding:utf-8 -*-
__author__ = 'poptest'
#考察alert弹框
import time
from selenium import webdriver
#打开火狐浏览器
dr = webdriver.Firefox()
#窗口最大化
dr.maximize_window()
#输入网址
dr.get("http://www.12306.cn/mormhweb/")
#点击搜索
dr.find_element_by_xpath(".//*[@id='fmsearch']/input[3]").click()
#定义...