ITeye博客

2015 年文章归档

共 17 篇文章

IEWebdriver 启动出错

Started InternetExplorerDriver server (64-bit) 2.42.0.0 Listening on port 29792 Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to …

2015-12-14 14:38 · java · selenium

Zabbix动态监控磁盘I/O

最近做压测,需要监控每台服务器的磁盘I/O,由于每台服务器的磁盘名称可能不一样,所以需要用到Zabbix的LLD功能来发现磁盘并监控I/O。 参考文章 http://www.programering.com/a/MDOwYDNwATc.html 一、客户端(被监控端) 1.发现磁盘的脚本(disk_discovery.sh) #!/bin/bash #written by lenwood #mail: diskarray=(`cat /proc/diskstats |grep -E "\b[sv]d[abcdefg]\b|\bxvd[abcdefg]\b"|grep -i "\b$1\b"|…

2015-11-20 15:18 · zabbix · I/O · zabbix

AH00558: apache2: Could not reliably determine the server's fully qualified doma

root@zabbixserv:# /etc/init.d/apache2 restart * Restarting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using IP. Set the 'ServerName' directive globally to suppress this message [ OK ] 解决方案: 1.vi /etc/apache2/apache2.conf 在此文件内增加 Serve…

2015-11-07 13:33 · apache2 · Apache · Apache2

今天你BDD了吗?

转载: http://www.iteye.com/topic/417899 Feature: Sign in In order to get access to protected sections of the site A user Should be able to sign in Scenario: User is not signed up Given no user exists with an email of "email@person.com" When I go to the sign in page And I sign in as "email@person.com/…

2015-08-10 11:34 · BDD · BDD

pkg_resources.DistributionNotFound

1.pip install lettuce 2.lettuce的时候报错了 信息主要是:pkg_resources.DistributionNotFound 解决方案: pip install -U setuptools 3.继续lettuce c:\Python27\Lib\site-packages>lettuce c:\Python27\lib\site-packages\fuzzywuzzy\fuzz.py:33: UserWarning: Using slow pure-python SequenceMat cher. Install python-Levenshtein to r…

2015-06-29 17:22 · selenium

学习Appium_Python_Client的使用

一、Appium_Python_Client介绍 Appium的实用方法都藏在Client的源码里,对于driver和webelement实例,均有对应的元素查找方法(webelement查找的是下面的子元素),有些儿专门针对手机的函数,则需要在这个Client安装后方可使用。 (以下内容转自: http://testerhome.com/topics/1166 ) appium为了实现自己的find查找方式,首先自定义了一个MobileBy类,给这个类对象塞入了它定义的一些扩展属性,这些属性的值会通过webdriver协议推送到server端去识别和执行,为了让这些属性运用到find方法中…

2015-06-25 16:18 · appium

Webdriver Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms

带的小弟遇到这个问题不知所措就找我解决,记录一下。 执行如下代码,chrome和IE都OK,执行火狐就挂了。 #浏览器数组 lists = ['chrome','internet explorer','firefox'] #循环浏览器执行脚本 for browser in lists: print browser driver = Remote(command_executor='http://127.0.0.1:4444/wd/hub', desired_capabilities={'platform':'ANY', 'browserName':browser, 'version':'',…

2015-06-25 11:57 · selenium · Firefox · selenium

win安装配置appium

上周日晚上听了一位大神的公开课,讲的是appium的配置,由于是小白,之前也没有弄过,工作中也没有用到就一直也没有配置。今天中午一哥们说他遇到问题没有搞定,问我环境搭建了没,刚好下午不怎么忙,明天端午了(端午出去玩 )所以下午就装了一下,在此记录一下安装过程。 一、安装node.js node.js 官方网址: https://nodejs.org/ 根据操作系统下载相应的版本 二、安装appium 在网上看见有很多推荐使用命令行的,但是我试了,或许是网速问题,都没有成功。 在Appium官方网站上下载操作系统相应的Appium版本。 https://bitbucket.org/appium…

2015-06-19 18:48 · appium · Python · node.js

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/sonatype/

问题描述:昨天晚上大厦停电,然后我们把所有的服务都停了,今天早上一大早来了启动的时候发现启动了过了大15s又关闭了。 root@ubuntu:/opt/nexus-2.8.0-05/bin # ./nexus status **************************************** WARNING - NOT RECOMMENDED TO RUN AS ROOT **************************************** Nexus OSS is running (31347). root@ubuntu:/opt/nexus-2.8.0-05/bi…

2015-06-17 11:10 · nexus · nexus

firefox运行时弹出安装向导

问题描述: 使用selenium.webdriver调用firefox运行脚本的时候,打开浏览器时总是弹出安装向导 解决方法: 修改C:\Users\Administrator\AppData\Roaming\Mozilla\Firefox\profiles.ini 文件 修改如下红色部分代码的值为0: [Profile0] Name=default IsRelative=0 Path=Profiles/jvaup1fb.default

2015-06-16 14:52 · python · selenium · selenium · 向导

Unable to start phantomjs with ghostdriver.

plantomjs最初是放在D:\\phantomjs\\bin\\phantomjs.exe 环境变量也添加了,各种尝试都是如下错误: error: selenium.common.exceptions.WebDriverException: Message: Unable to start phantomjs with ghostdriver. Screenshot: available via screen 后来我放到C盘 #指定 phantomjs 驱动 path1='C:\\Python27\\phantomjs\\bin\\phantomjs.exe' path2='C:\\Py…

2015-06-12 16:37 · selenium · selenium

Error forwarding the new session cannot find : Capabilities [{browserName=htmlun

代码: driver = webdriver.Remote( command_executor=' http://127.0.0.1:4444/wd/hub' , desired_capabilities={'platform': 'ANY', 'browserName': 'htmlunit', 'version': '', 'javascriptEnabled': True }) 运行的时候报:selenium.common.exceptions.WebDriverException: Message: Error forwarding the new session cannot fi…

2015-06-12 11:05 · selenium · selenium · htmlunit

记录测试用例中使用绝对路径遇到的问题

我本人比较喜欢相对路径,因为很多时候不同系统下使用绝对路径复用性太差。 问题描述:执行某个项目的所有测试用例的时候,遇到读取某个目录下面的文件,使用相对路径有时候达不到效果 比如如下结构: test_project test_case pub init.py public.py test_login.py test_send_email.py report xxx.html test_data login.xml all_test.py 我在test_login.py里面调用login.xml的时候使用相对路径没有问题(..\test_data\login.xml), 但是我在all_tes…

2015-06-08 10:56 · python · selenium · Python · 路径问题

IE“This is the initial start page for the WebDriver server.”

这个问题是一个童鞋遇到的,外包华为的上不了网,我帮忙百度的,就此记录一下。 现像: IE能启动但时提示“This is the initial start page for the WebDriver server.” 报错: Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Browser zoom level was set to 125%. It should be set to 100…

2015-05-26 16:04 · selenium

xamarin介绍

由于公司使用xamarin开发的APP申请版权,需要第三方进行审核,而第三方人员不懂xamarin,所以整理了一个文档。

2015-05-26 14:27 · xamarin · Xamarin

Can't connect to X11 window server using 'localhost:0' as the value of the DISPL

问题描述: 使用xshell在ubuntu上面运行./jmeter, 报错Can't connect to X11 window server using 'localhost:0' as the value of the DISPLAY variable. 解决方案:export DISPLAY=IP:0.0或者export DISPLAY=localhost:0.0 注意:最好重新打开一个xshell窗口 问题补充: 还有一种情况有些童鞋是在vagrant下面直接调用OK,但是使用su 在root用户下面调用还是报上面的错误的话,如果上述步骤操作之后还是无效的话,这时候请退出,然后使用s…

2015-05-25 11:52 · jmeter

python基础-学习笔记

一.输入和输出 1.1打印print 1.2输入input raw_input 1.2.1 input () 有点矫情要求用户输入的数据格式必须正确,eg:字符串必须加引号,否则抛出异常 1.2.2 raw_input()没有input那么矫情,输入什么就打印什么 1.3 引号和注释 1.3.1 单引号和双引号可以嵌套但是不能交叉 1.3.2 # 单行注释 1.3.3 ''' ''' 和 """""" 多行注释 二、分支和语句 2.1 if 语句 eg1: if 2 >3 : print 2 else : print 3 eg2:根据你输入的成绩,打印等级 score = raw_input…

2015-05-20 17:56 · python