04 2015 档案

webDriver API——第15部分Expected conditions Support
摘要:classselenium.webdriver.support.expected_conditions.alert_is_presentBases:objectExpect an alert to be present.classselenium.webdriver.support.expected... 阅读全文

posted @ 2015-04-29 22:50 帅胡 阅读(600) 评论(0) 推荐(0)

webDriver API——第14部分Color Support
摘要:classselenium.webdriver.support.color.Color(red,green,blue,alpha=1)Bases:objectColor conversion support classExample:from selenium.webdriver.support.c... 阅读全文

posted @ 2015-04-29 22:49 帅胡 阅读(280) 评论(0) 推荐(0)

webDriver API——第13部分UI Support
摘要:classselenium.webdriver.support.select.Select(webelement)deselect_all()Clear all selected entries. This is only valid when the SELECT supports multipl... 阅读全文

posted @ 2015-04-29 22:48 帅胡 阅读(223) 评论(0) 推荐(0)

webDriver API——第12部分WebElement
摘要:classselenium.webdriver.remote.webelement.WebElement(parent,id_)Bases:objectRepresents a DOM element.Generally, all interesting operations that intera... 阅读全文

posted @ 2015-04-29 22:46 帅胡 阅读(479) 评论(0) 推荐(0)

webDriver API——第11部分Remote WebDriver
摘要:The WebDriver implementation.classselenium.webdriver.remote.webdriver.WebDriver(command_executor='http://127.0.0.1:4444/wd/hub',desired_capabilities=N... 阅读全文

posted @ 2015-04-29 22:45 帅胡 阅读(491) 评论(0) 推荐(0)

webDriver API——第10部分Chrome WebDriver
摘要:classselenium.webdriver.chrome.webdriver.WebDriver(executable_path='chromedriver',port=0,chrome_options=None,service_args=None,desired_capabilities=No... 阅读全文

posted @ 2015-04-29 22:23 帅胡 阅读(814) 评论(0) 推荐(0)

webDriver API——第9部分Firefox WebDriver
摘要:classselenium.webdriver.firefox.webdriver.WebDriver(firefox_profile=None,firefox_binary=None,timeout=30,capabilities=None,proxy=None)Bases:selenium.we... 阅读全文

posted @ 2015-04-29 22:21 帅胡 阅读(261) 评论(0) 推荐(0)

webDriver API——第8部分Utilities
摘要:The Utils methods.selenium.webdriver.common.utils.free_port()Determines a free port using sockets.selenium.webdriver.common.utils.is_connectable(port)... 阅读全文

posted @ 2015-04-29 21:48 帅胡 阅读(324) 评论(0) 推荐(0)

webDriver API——第7部分Desired Capabilities
摘要:The Desired Capabilities implementation.classselenium.webdriver.common.desired_capabilities.DesiredCapabilitiesBases:objectSet of default supported de... 阅读全文

posted @ 2015-04-29 21:45 帅胡 阅读(1464) 评论(0) 推荐(0)

webDriver API——第6部分Locate elements By
摘要:These are the attributes which can be used to locate elements. See theLocating Elementschapter for example usages.The By implementation.classselenium.... 阅读全文

posted @ 2015-04-29 21:43 帅胡 阅读(175) 评论(0) 推荐(0)

webDriver API——第5部分Special Keys
摘要:The Keys implementation.classselenium.webdriver.common.keys.KeysBases:objectSet of special keys codes.ADD= u'\ue025'ALT= u'\ue00a'ARROW_DOWN= u'\ue015... 阅读全文

posted @ 2015-04-29 21:41 帅胡 阅读(354) 评论(0) 推荐(0)

WebDriver API——第4部分Alerts
摘要:The Alert implementation.classselenium.webdriver.common.alert.Alert(driver)Bases:objectAllows to work with alerts.Use this class to interact with aler... 阅读全文

posted @ 2015-04-29 21:40 帅胡 阅读(209) 评论(0) 推荐(0)

WebDriver API——第3部分Action Chains
摘要:The ActionChains implementation,classselenium.webdriver.common.action_chains.ActionChains(driver)Bases:objectActionChains are a way to automate low le... 阅读全文

posted @ 2015-04-29 21:39 帅胡 阅读(413) 评论(0) 推荐(0)

WebDriver API——第2部分Exceptions
摘要:Exceptions that may happen in all the webdriver code.exceptionselenium.common.exceptions.ElementNotSelectableException(msg=None,screen=None,stacktrace... 阅读全文

posted @ 2015-04-29 21:34 帅胡 阅读(726) 评论(0) 推荐(0)

WebDriver API——第1部分
摘要:The API definitions in this chapter shows the absolute location of classes. However the recommended import style is as given below:from selenium impor... 阅读全文

posted @ 2015-04-29 21:31 帅胡 阅读(176) 评论(0) 推荐(0)

白盒测试-覆盖率
该文被密码保护。

posted @ 2015-04-29 21:24 帅胡 阅读(0) 评论(0) 推荐(0)

Selenium中定位元素的方法
摘要:find_element_by_id()find_element_by_name()find_element_by_class_name()find_element_by_tag_name()find_element_by_link_text()find_element_by_partial_lin... 阅读全文

posted @ 2015-04-27 15:12 帅胡 阅读(250) 评论(0) 推荐(0)

清除tomcat的缓存
摘要:删除tomcat目录下的work目录中的Catalina目录就好了! 阅读全文

posted @ 2015-04-24 16:28 帅胡 阅读(228) 评论(0) 推荐(0)

Python模块学习 ---- logging 日志记录
摘要:许多应用程序中都会有日志模块,用于记录系统在运行过程中的一些关键信息,以便于对系统的运行状况进行跟踪。在.NET平台中,有非常著名的第三方开源日志组件log4net,c++中,有人们熟悉的log4cpp,而在python中,我们不需要第三方的日志组件,因为它已经为我们提供了简单易用、且功能强大的日志... 阅读全文

posted @ 2015-04-24 09:43 帅胡 阅读(291) 评论(0) 推荐(0)

python urllib2 httplib HTTPConnection
摘要:httplib实现了HTTP和HTTPS的客户端协议,一般不直接使用,在python更高层的封装模块中(urllib,urllib2)使用了它的http实现。importhttplibconn=httplib.HTTPConnection("google.com")conn.request('get... 阅读全文

posted @ 2015-04-23 15:21 帅胡 阅读(1860) 评论(0) 推荐(0)

Python模块学习 --- urllib
摘要:urllib模块提供的上层接口,使我们可以像读取本地文件一样读取www和ftp上的数据。每当使用这个模块的时候,老是会想起公司产品的客户端,同事用C++下载Web上的图片,那种“痛苦”的表情。我以前翻译过libcurl教程,这是在C/C++环境下比较方便实用的网络操作库,相比起libcurl,Pyt... 阅读全文

posted @ 2015-04-23 14:17 帅胡 阅读(189) 评论(0) 推荐(0)

Selenium WebDriver问题--Internet Explorer保护模式设置问题
摘要:在用WebDriver中打开Internet Explorer访问百度的是,报下面错误:org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Protect... 阅读全文

posted @ 2015-04-23 10:32 帅胡 阅读(2254) 评论(0) 推荐(0)

python2.7里的StringIO.StringIO与BytesIO有什么区别
摘要:import StringIO与from io import BytesIO的区别open()函数返回的文件对象取决于模式。当使用文本模式打开文件时,它返回一个TextIOBase的子类。当使用二进制打开时,返回的是BufferedIOBase的子类。准确细分为:可读二进制模式,返回BufferRe... 阅读全文

posted @ 2015-04-22 09:41 帅胡 阅读(1321) 评论(0) 推荐(0)

使用PyQt4 designer时无法启动uic解决方案
摘要:1.自己调用命令行 pyuic4-ocodeFile.py-xyourUIfile.ui2.写一个批处理,每次双击就行了,跟你的源文件放在同一文件夹下 importosforroot,dirs,filesinos.walk('.'):forfileinfiles:iffile.endswith(... 阅读全文

posted @ 2015-04-18 15:30 帅胡 阅读(1119) 评论(0) 推荐(0)

Tetris
摘要:he Tetris game is one of the most popular computer games ever created. The original game was designed and programmed by a Russian programmerAlexey Paj... 阅读全文

posted @ 2015-04-18 13:14 帅胡 阅读(417) 评论(0) 推荐(0)

Burning widget
摘要:This is a widget that we can see in Nero, K3B, or other CD/DVD burning software.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode PyQt4 tutorial In t... 阅读全文

posted @ 2015-04-18 13:09 帅胡 阅读(323) 评论(0) 推荐(0)

QtGui.QBrush
摘要:TheQtGui.QBrushis an elementary graphics object. It is used to paint the background of graphics shapes, such as rectangles, ellipses, or polygons. A b... 阅读全文

posted @ 2015-04-18 13:05 帅胡 阅读(838) 评论(0) 推荐(0)

QtGui.QPen
摘要:TheQtGui.QPenis an elementary graphics object. It is used to draw lines, curves and outlines of rectangles, ellipses, polygons, or other shapes.#!/usr... 阅读全文

posted @ 2015-04-18 10:50 帅胡 阅读(514) 评论(0) 推荐(0)

Colours
摘要:A colour is an object representing a combination of Red, Green, and Blue (RGB) intensity values. Valid RGB values are in the range from 0 to 255. We c... 阅读全文

posted @ 2015-04-18 10:31 帅胡 阅读(289) 评论(0) 推荐(0)

Drawing points
摘要:A point is the most simple graphics object that can be drawn. It is a small spot on the window.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode PyQt... 阅读全文

posted @ 2015-04-18 10:29 帅胡 阅读(446) 评论(0) 推荐(0)

Drawing text
摘要:We begin with drawing some Unicode text on the client area of a window.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode PyQt4 tutorial In this examp... 阅读全文

posted @ 2015-04-18 10:28 帅胡 阅读(430) 评论(0) 推荐(0)

Drag & drop a button widget
摘要:In the following example, we will demonstrate how to drag & drop a button widget.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode PyQt4 tutorialIn t... 阅读全文

posted @ 2015-04-18 10:26 帅胡 阅读(768) 评论(0) 推荐(0)

Simple drag and drop
摘要:In computer graphical user interfaces, drag-and-drop is the action of (or support for the action of) clicking on a virtual object and dragging it to a... 阅读全文

posted @ 2015-04-18 10:23 帅胡 阅读(497) 评论(0) 推荐(0)

QtGui.QComboBox
摘要:TheQtGui.QComboBoxis a widget that allows a user to choose from a list of options.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode PyQt4 tutorial Th... 阅读全文

posted @ 2015-04-17 20:13 帅胡 阅读(587) 评论(0) 推荐(0)

QtGui.QSplitter
摘要:AQtGui.QSplitterlets the user control the size of child widgets by dragging the boundary between the children. In our example, we show threeQtGui.QFra... 阅读全文

posted @ 2015-04-17 20:12 帅胡 阅读(706) 评论(0) 推荐(0)

QtGui.QLineEdit
摘要:AQtGui.QLineEditis a widget that allows to enter and edit a single line of plain text. There are undo and redo, cut and paste, and drag & drop functio... 阅读全文

posted @ 2015-04-17 20:11 帅胡 阅读(675) 评论(0) 推荐(0)

QtGui.QPixmap
摘要:AQtGui.QPixmapis one of the widgets used to work with images. It is optimized for showing images on screen. In our code example, we will use theQtGui.... 阅读全文

posted @ 2015-04-17 20:09 帅胡 阅读(1543) 评论(0) 推荐(0)

QtGui.QCalendarWidget
摘要:AQtGui.QCalendarWidgetprovides a monthly based calendar widget. It allows a user to select a date in a simple and intuitive way.#!/usr/bin/python# -*-... 阅读全文

posted @ 2015-04-17 19:06 帅胡 阅读(1064) 评论(0) 推荐(0)

QtGui.QProgressBar
摘要:A progress bar is a widget that is used when we process lengthy tasks. It is animated so that the user knows that the task is progressing. TheQtGui.QP... 阅读全文

posted @ 2015-04-17 19:05 帅胡 阅读(521) 评论(0) 推荐(0)

QtGui.QSlider
摘要:AQtGui.QSlideris a widget that has a simple handle. This handle can be pulled back and forth. This way we are choosing a value for a specific task. So... 阅读全文

posted @ 2015-04-17 19:03 帅胡 阅读(716) 评论(0) 推荐(0)

ToggleButton
摘要:A toggle button is aQtGui.QPushButtonin a special mode. It is a button that has two states: pressed and not pressed. We toggle between these two state... 阅读全文

posted @ 2015-04-17 19:01 帅胡 阅读(457) 评论(0) 推荐(0)

QtGui.QCheckBox
摘要:AQtGui.QCheckBoxis a widget that has two states: on and off. It is a box with a label. Check boxes are typically used to represent features in an appl... 阅读全文

posted @ 2015-04-17 19:00 帅胡 阅读(1017) 评论(0) 推荐(0)

QtGui.QFileDialog
摘要:TheQtGui.QFileDialogis a dialog that allows users to select files or directories. The files can be selected for both opening and saving.#!/usr/bin/pyt... 阅读全文

posted @ 2015-04-17 18:33 帅胡 阅读(729) 评论(0) 推荐(0)

QtGui.QFontDialog
摘要:TheQtGui.QFontDialogis a dialog widget for selecting a font.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode PyQt4 tutorial In this example, we sele... 阅读全文

posted @ 2015-04-17 18:32 帅胡 阅读(687) 评论(0) 推荐(0)

QtGui.QColorDialog
摘要:heQtGui.QColorDialogprovides a dialog widget for selecting colour values.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode PyQt4 tutorial In this exa... 阅读全文

posted @ 2015-04-17 18:31 帅胡 阅读(750) 评论(0) 推荐(0)

QtGui.QInputDialog
摘要:TheQtGui.QInputDialogprovides a simple convenience dialog to get a single value from the user. The input value can be a string, a number or an item fr... 阅读全文

posted @ 2015-04-17 18:30 帅胡 阅读(536) 评论(0) 推荐(0)

Emitting signals
摘要:Objects created from aQtCore.QObjectcan emit signals. In the following example we will see how we can emit custom signals.#!/usr/bin/python# -*- codin... 阅读全文

posted @ 2015-04-17 17:37 帅胡 阅读(261) 评论(0) 推荐(0)

Event sender
摘要:Sometimes it is convenient to know which widget is the sender of a signal. For this, PyQt4 has thesender()method.#!/usr/bin/python# -*- coding: utf-8 ... 阅读全文

posted @ 2015-04-17 17:35 帅胡 阅读(399) 评论(0) 推荐(0)

Reimplementing event handler
摘要:Events in PyQt4 are processed often by reimplementing event handlers.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode PyQt4 tutorial In this example... 阅读全文

posted @ 2015-04-17 17:34 帅胡 阅读(338) 评论(0) 推荐(0)

Events
摘要:All GUI applications are event-driven. Events are generated mainly by the user of an application. But they can be generated by other means as well: e.... 阅读全文

posted @ 2015-04-17 17:33 帅胡 阅读(306) 评论(0) 推荐(0)

GridLayout with span
摘要:Widgets can span multiple columns or rows in a grid. In the next example we illustrate this.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode PyQt4 t... 阅读全文

posted @ 2015-04-17 17:23 帅胡 阅读(514) 评论(0) 推荐(0)

QtGui.QGridLayout
摘要:The most universal layout class is the grid layout. This layout divides the space into rows and columns. To create a grid layout, we use theQtGui.QGri... 阅读全文

posted @ 2015-04-17 17:22 帅胡 阅读(928) 评论(0) 推荐(0)

Box layout
摘要:Layout management with layout classes is much more flexible and practical. It is the preferred way to place widgets on a window. TheQtGui.QHBoxLayouta... 阅读全文

posted @ 2015-04-17 17:21 帅胡 阅读(319) 评论(0) 推荐(0)

Absolute positioning
摘要:The programmer specifies the position and the size of each widget in pixels. When you use absolute positioning, we have to understand the following li... 阅读全文

posted @ 2015-04-17 17:20 帅胡 阅读(323) 评论(0) 推荐(0)

Statusbar、Menubar、Toolbar合集
摘要:In the last example of this section, we create a menubar, a toolbar and a statusbar. We also create a central widget.#!/usr/bin/python# -*- coding: ut... 阅读全文

posted @ 2015-04-17 17:00 帅胡 阅读(610) 评论(0) 推荐(0)

Toolbar
摘要:Menus group all commands that we can use in an application. Toolbars provide a quick access to the most frequently used commands.#!/usr/bin/python# -*... 阅读全文

posted @ 2015-04-17 16:57 帅胡 阅读(387) 评论(0) 推荐(0)

Menubar
摘要:A menubar is a common part of a GUI application. It is a group of commands located in various menus.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode... 阅读全文

posted @ 2015-04-17 16:55 帅胡 阅读(567) 评论(0) 推荐(0)

Statusbar
摘要:Main windowTheQtGui.QMainWindowclass provides a main application window. This enables to create a classic application skeleton with a statusbar, toolb... 阅读全文

posted @ 2015-04-17 16:52 帅胡 阅读(618) 评论(0) 推荐(0)

Centering window on the screen
摘要:The following script shows how we can center a window on the desktop screen.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode PyQt4 tutorial This pro... 阅读全文

posted @ 2015-04-17 16:50 帅胡 阅读(299) 评论(0) 推荐(0)

Message Box
摘要:By default, if we click on the x button on the titlebar, theQtGui.QWidgetis closed. Sometimes we want to modify this default behaviour. For example, i... 阅读全文

posted @ 2015-04-17 16:49 帅胡 阅读(414) 评论(0) 推荐(0)

Closing a window
摘要:The obvious way to how to close a window is to click on the x mark on the titlebar. In the next example, we will show how we can programatically close... 阅读全文

posted @ 2015-04-17 16:48 帅胡 阅读(361) 评论(0) 推荐(0)

HTML解析模块
摘要:import htmlhtml.escape(s, quote=True)对特殊字符进行转义Convert the characters &, in string s to HTML-safe sequences. Use this if you need to display text that... 阅读全文

posted @ 2015-04-17 14:46 帅胡 阅读(580) 评论(0) 推荐(0)

Showing a tooltip
摘要:We can provide a balloon help for any of our widgets.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode PyQt4 tutorial This example shows a tooltip on... 阅读全文

posted @ 2015-04-17 12:32 帅胡 阅读(451) 评论(0) 推荐(0)

An application icon
摘要:The application icon is a small image which is usually displayed in the top left corner of the titlebar. In the following example we will show how we ... 阅读全文

posted @ 2015-04-17 11:25 帅胡 阅读(320) 评论(0) 推荐(0)

Simple example
摘要:This is a simple example showing a small window. Yet we can do a lot with this window. We can resize it, maximise it, or minimise it. This requires a ... 阅读全文

posted @ 2015-04-17 11:19 帅胡 阅读(490) 评论(0) 推荐(0)

在 Java SE 6 中监视和诊断性能问题
摘要:Java™ Platform, Standard Edition 6 (Java SE) 专注于提升性能,提供的增强工具可以管理和监视应用程序以及诊断常见的问题。本文将介绍 Java SE 平台中监视和管理的基本知识,并提供 Java SE 6 中相关增强的详细信息。Java SE 6 对性能进行了... 阅读全文

posted @ 2015-04-17 11:07 帅胡 阅读(220) 评论(0) 推荐(0)

使用 VisualVM 进行性能分析及调优
摘要:VisualVM 是一款免费的\集成了多个 JDK 命令行工具的可视化工具,它能为您提供强大的分析能力,对 Java 应用程序做性能分析和调优。这些功能包括生成和分析海量数据、跟踪内存泄漏、监控垃圾回收器、执行内存和 CPU 分析,同时它还支持在 MBeans 上进行浏览和操作。本文主要介绍如何使用... 阅读全文

posted @ 2015-04-17 10:49 帅胡 阅读(330) 评论(0) 推荐(0)

使用web_url注意Resource的选项
摘要:在使用web_url的时候,一定注意Resource的使用,一般最好使用Resource=0,如果使用Resource=1,那么一定要修改配置。Resource AttributeIf Resource is set to 0, the URL is always downloaded during... 阅读全文

posted @ 2015-04-10 16:50 帅胡 阅读(422) 评论(0) 推荐(0)

MySQL函数大全
摘要:字符串函数1.ASCII(str) 返回字符串str的第一个字符的ASCII值(str是空串时返回0) SELECT ASCII('2'); ->502.ORD(str) 如果字符串str句首是单字节返回与ASCII()函数返回的相同值。 如果是一个多字节字符,以格式返回((first b... 阅读全文

posted @ 2015-04-08 10:00 帅胡 阅读(235) 评论(0) 推荐(0)

SQL 查询排名是第三位的人
摘要:MYSQL可以使用如下的用法:SELECT id FROM partner_broker_account_record ORDER BY id LIMIT 2, 1在limit为2的基础上加1,sql server是:select top 1 * from tbl_score where tbl_s... 阅读全文

posted @ 2015-04-02 13:59 帅胡 阅读(1262) 评论(0) 推荐(0)

导航