VisualBox之所以在Linux上比传统的VMware快得多,关键一点就是它和Linux内核的结合比较紧密,这也是开源的优点。不过Linux内核更新很频繁,每次更新内核后启动VirtualBox都会提示:VirtualBox kernel driver not installed. The vb...
分类:
系统相关 时间:
2014-11-12 09:18:17
阅读次数:
179
#coding=utf-8
fromseleniumimportwebdriver
#fromselenium.webdriver.remoteimportswitch_to
#fromselenium.webdriver.commonimportalert
#importunittest
importtime,os
defusers_zidian():#用户名用例用一个字典实现参数化调用#
users={‘zhengshuheng‘:‘123456‘,‘609958331@..
分类:
编程语言 时间:
2014-11-11 23:02:04
阅读次数:
382
测试脚本是否支持在不同浏览器运行firefox浏览器运行脚本from selenium import webdriverdriver=webdriver.Firefox()driver.get("http://baidu.com")assert "sss" in driver.titledriver...
分类:
编程语言 时间:
2014-11-11 19:04:24
阅读次数:
241
查看防火墙状态/etc/init.d/iptables status/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT#其中8080为指定的端口/etc/rc.d/init.d/iptables save #将更改进行保存/etc/init.d...
分类:
系统相关 时间:
2014-11-11 16:10:33
阅读次数:
150
# !/bin/bash rc=$1exe=$2if [ ! -e "$rc" ]; then echo "rc not exist" exit fi if [ ! -e "$exe" ]; then echo "exe not exist" exit fi ver=`c...
分类:
其他好文 时间:
2014-11-11 14:20:03
阅读次数:
169
转载自http://blog.chinaunix.net/uid-21658993-id-3129667.html在STM32中,有五个时钟源,为HSI、HSE、LSI、LSE、PLL。其实是四个时钟源,如下图所示(灰蓝色),PLL是由锁相环电路倍频得到PLL时钟。 ①、HSI是高速内部时钟,RC....
分类:
其他好文 时间:
2014-11-11 12:14:45
阅读次数:
288
#enconding:utf-8
require 'selenium-webdriver'
require 'rspec'
describe "baidu main page" do
it "should have 百度一下 button on the baidu main page"do
dr = Selenium::WebDriver.for:ie
url = 'www.baid...
分类:
其他好文 时间:
2014-11-10 23:21:48
阅读次数:
1334
在使用Selenium做自动化时,有的时候希望失败了进行截图,下面提供一个封装的截图方法,方便使用,代码如下://只需要传入文件名字即可,而这个名字大家可以直接使用测试的方法名public void captureScreenshot(String fileName) {String dirName...
分类:
Web程序 时间:
2014-11-10 21:36:59
阅读次数:
281
使用webdriver的时候,select控件经常会绑定onchange事件,在selenium2.09之前click方法对onchange事件有bug,2.09以后修复了,但是根据经验也遇到用seleniumui下面的select的类去做select操作,有时也可能不发触发onchange事件,所...
分类:
Web程序 时间:
2014-11-10 21:17:26
阅读次数:
215
selenium2对之前的rc代码提供了兼容性接口,如果你之前的code都是用rc写,而现在又想摆脱要每次启动server,你只需要略做修改即可。代码如下:public class TestWb extends SeleneseTestCase {@Beforepublic void setUp()...
分类:
Web程序 时间:
2014-11-10 21:13:47
阅读次数:
200