`
fangpeng123456789
  • 浏览: 45197 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

selenimIDE所用API

 
阅读更多





Selenium常用方法介绍  





目 录
1 概述 5
2 Selenium常用方法 5
2.1 Selenium系统级方法 5
2.1.1void start( ) 6
2.1.2 void stop() 7
2.1.3 void shutDownSeleniumServer() 7
2.2 Selenium模拟操作浏览器(Actions) 8
2.2.1void open(String url) 8
2.2.2void openWindow(String url,String windowID) 9
2.2.3void close() 9
2.2.4void type(String locator,String value) 9
2.2.5void submit(String formLocator) 10
2.2.6void click(String locator) 10
2.2.7void doubleClick(String locator) 10
2.2.8void clickAt (String locator,String coordString) 11
2.2.9void focus(String locator) 11
2.2.10 void check(String locator) 11
2.2.11 void uncheck(String locator) 12
2.2.12 void keyPress(String locator,String keySequence) 12
2.2.13 void shiftKeyDown() 13
2.2.14 void shiftKeyUp() 13
2.2.15 void altKeyDown() 13
2.2.16 void altKeyUp () 13
2.2.17 void controlKeyDown () 14
2.2.18 void controlKeyUp () 14
2.2.19 void keyDown (String locator,String keySequence) 14
2.2.20 void keyUp (String locator,String keySequence) 15
2.2.21 void setSpeed(String value) 15
2.2.22 void getSpeed() 15
2.2.23 select(String selectLocator,String optionLocator); 16
2.2.24 void selectWindow(String windowID); 17
2.2.25 void selectPopUp(String windowID) 18
2.2.26 void deselectPopUp() 19
2.2.27 void selectFrame(String locator) 19
2.2.28 void waitForPopUp(String windowID,String timeout) 19
2.2.29 void chooseCancelOnNextConfirmation() 20
2.2.30 void chooseOkOnNextConfirmation() 20
2.2.31 void answerOnNextPrompt(String answer) 21
2.2.32 void windowFocus() 21
2.2.33 void windowMaximize() 22
2.3.34void waitForCondition(String script,String timeout) 22
2.3.35void setTimeout(String timeout) 22
2.3.36waitForPageToLoad(String timeout) 23
2.3.37 waitForFrameToLoad(frameAddress, timeout) 23
2.3.38void runScript(String script) 24
2.3.39void attachFile(String fieldLocator,String fileLocator) 24
2.3.40void captureScreenshot(String filename) 24
2.3.41String captureScreenshotToString() 25
2.3 Selenium判断预期需要(Assertions) 25
2.3.1boolean isAlertPresent() 25
2.3.2boolean isPromptPresent() 26
2.3.3boolean isConfirmationPresent() 26
2.3.4String getAlert() 26
2.3.5String getConfirmation() 27
2.3.6String getPrompt() 27
2.3.7boolean isChecked(String locator) 28
2.3.8boolean isTextPresent(String pattern) 28
2.3.9boolean isElementPresent(String locator) 29
2.3.10boolean isVisible(String locator) 29
2.3.11boolean isEditable(String locator) 29
2.4 Selenium常用取值方法 30
2.4.1String getLocation() 30
2.4.2String getTitle() 30
2.4.3String getBodyText() 30
2.4.4String getValue(String locator) 31
2.4.5String getText(String locator) 31
2.4.6String getEval(String script) 31
2.4.7String getTable(String tableCellAddress) 32
2.4.8String[] getSelectedValues(String selectLocator) 32
2.4.9String getSelectedValue(String selectLocator) 33
2.4.10String getAttribute(String attributeLocator) 33
2.4.11String[] getAllButtons() 33
2.4.12String[] getAllLinks() 34
2.4.13String[] getAllFields() 34
2.4.14String[] getAllWindowIds() 34
2.4.15String[] getAllWindowNames() 34
2.4.16String[] getAllWindowTitles() 35
2.4.17String getHtmlSource() 35
3 Xpath相关语法 35


概述
   HELLO ,大家好,欢迎打开本文。
   该文档是为初次接触Selenium的同学而编,初衷是让同学们能够快速了解该框架提供的常用方法,方便在遇到合适的场景中使用,由于编者是初学者,技术能力拙劣,英文水平有限,可能存在部分方法的说明或示例存在不到位甚至是错误,欢迎同学们指正完善。
   Selenium是 ThoughtWorks 专门为 Web 应用而开发的自动化测试工具,适合进行功能测试,可直接运行在浏览器之上,使得测试脚本可以在受支持的浏览器中运行,但是Selenium是轻量的测试框架, 脚本所处理的测试用例构成简单,其实质就是通过HTTP协议,发送请求(request)来完成测试用例,所以很困难处理业务逻辑关系强的测试用例。
   关于Selenium产生背景以及原理,可参考新手入门教程,该文档是网上找到的相对比较全面的文档,基本能满足初学者的需要,见下文第三章中的“新手入门教程”。
    接下来将着重介绍Selenium框架的常用方法,包含Selenium系统级方法、模拟浏览器操作的方法以及判断预期结果和常用的取值方法,也顺便把Xpath相关语法整合在一起,具体详见下文:
Selenium常用方法
Selenium系统级方法
该部分主要是Selenium自带的方法,比如启动、停止Selenium进程或彻底结束一个Selenium服务代理。
2.1.1void start( ) 
用途描述 原英文描述
启动selenium 进程 ,用此方法的前提是需要先定义一个selenium进程,该进程包含连接selenium server的IP地址、端口号、默认浏览器类型(比如FireFox、ie等)、被测对象的URL。
Launches the browser with a new Selenium session
示例:
public class Seleniumtestcode {
        //示例化一个Selenium对象
  private Selenium selenium;
        //定义setup方法,初始化selenium对象
  public void setUp() {
        // url : 就是你要测试的网站
//127.0.0.1:  相当于localhost,可以不是localhost,但是必须是 selenium server 启动的地址
    //*iexplore :  可以是其它浏览器类型,比如FireFox
selenium = new DefaultSelenium("127.0.0.1", 4444, "*iexplore", "http://www.baidu.com/");
        //连接本地的4444端口SeleniumServer服务器,打开ie浏览器,访问百度
    selenium.start( );
    }

2.1.2 void stop()
用途描述 原英文描述
停止selenium 进程
Ends the test session, killing the browser
示例:
package com.thoughtworks.selenium;   
import junit.framework.*;   
import org.openqa.selenium.server.*;   
public class GoogleTest extends TestCase   
{   
private Selenium selenium;   
    public void setUp() throws Exception {   
    String url = "http://www.google.com";   
    selenium = new DefaultSelenium("localhost", SeleniumServer.getDefaultPort(), "*firefox", url);
 selenium.start();   
    }   
 protected void tearDown() throws Exception {   
// 停止selenium进程,关闭所有通过selenium打开的浏览器
  selenium.stop();   
 }   

2.1.3 void shutDownSeleniumServer()
用途描述 原英文描述
停止Selenium Server服务,关闭所有浏览器会话,通常情况我们建议用stop()方法停止浏览器进程就可以了,而不是把整个selenium服务都停止掉。 Kills the running Selenium Server and all browser sessions.  After you run this command, you will no longer be able to send commands to the server; you can't remotely start the server once it has been stopped.  Normally
you should prefer to run the "stop" command, which terminates the current browser session, rather than shutting down the entire server
示例:

Selenium.shutDownSeleniumServer()

Selenium模拟操作浏览器(Actions)
   此类方法描述了用户所会作出的操作,模拟用户与 Web 应用程序的交互。例如,单击一个按钮和填写一个表单,这些都是常见的用户操作,可以用 Selenium 命令来自动化这些操作。有的Action是立即执行并返回结果,如type、select等,但有的则需要等待一段时间才能返回结果,如open、click等,这就需要用到waitfor***这类方法。
2.2.1void open(String url)
用途描述 原英文描述
在浏览器中打开URL对应的网页,可以接受相对和绝对路径两种形式,注意:如果是IE下非IEHTA模式,该URL必须在与通过start()启动的浏览器相同的域内,若需要重新打开另外一个新的域,则必须再次使用start()方法重新打开新的浏览器。IEHTA模式则可以跨域打开浏览器。 Opens an URL in the test frame. This accepts both relative and absolute
URLs.
The "open" command waits for the page to load before proceeding, ie. the "AndWait" suffix is implicit.
<em>Note</em>: The URL must be on the same domain as the runner HTML due to security restrictions in the browser (Same Origin Policy). If you need to open an URL on another domain, use the Selenium Server to start a new browser session on that domain.
@param url the URL to open; may be relative or absolute
示例:

public void testGoogle(){
        //打开google网页
        selenium.open("http://www.google.com");


2.2.2void openWindow(String url,String windowID)
用途描述 原英文描述
打开指定URL的页面,并且定义该页面的WindowID,在打开多个窗口的情况下,方便selectWindow()方法需要聚焦指定的窗口。参数URL是需要打开页面的URL地址,WindowID是为对应页面所字窗口自定义的ID Opens a popup window (if a window with that ID isn't already open).
After opening the window, you'll need to select it using the selectWindow
command.
@param url the URL to open, which can be blank
@param windowID the JavaScript window ID of the window to select
示例:
 //打开/life_helper.htm?agent=EAON0104页面,定义该页面的WindowID为1
 //打开//login.htm页面,定义该页面的WindowID为2
selenium.openWindow("/life_helper.htm?agent=EAON0104", "1");
selenium.openWindow("/login.htm", "2");
 //聚焦窗口ID为1的页面
selenium.selectWindow("1");   

2.2.3void close()
用途描述 原英文描述
关闭对应open方法打开的所有浏览器以及弹出的子浏览器。 Simulates the user clicking the "close" button in the titlebar of a popup window or tab.
示例:

Selenium.close( )

2.2.4void type(String locator,String value)
用途描述 原英文描述
模拟人手的输入过程,往指定的input中输入值,也适合复给选和单选框赋值,参数locator是需要被赋值控件的名称或者ID,value是给控件赋予的值,比如给名称为ysearchq的文本框中输入“123” Sets the value of an input field, as though you typed it in.
<p>Can also be used to set the value of combo boxes, check boxes, etc. In these cases,
value should be the value of the option selected, not the visible text.</p>
@param locator an <a href="#locators">element locator</a>
@param value the value to type
示例:

selenium.type("ysearchq", "123")

2.2.5void submit(String formLocator)
用途描述 原英文描述
用于没有提交按钮的表单的提交,参数formLocator为需要提交表单的名称或者ID,比如提交一个表单名称为abc的表单 Submit the specified form. This is particularly useful for forms without submit buttons, e.g. single-input "Search" forms.
@param formLocator an <a href="#locators">element locator</a> for the form you want to submit
示例:

Selenium.submit(“abc”)

2.2.6void click(String locator)
用途描述 原英文描述
点击连接,按钮,复选和单选框,参数locator表示对应控件在页面中的名称或者ID,比如点击名称为addd的链接 Clicks on a link, button, checkbox or radio button. If the click action
causes a new page to load (like a link usually does), call
waitForPageToLoad.
@param locator an element locator
示例:

Selenium.click(“addd”)

2.2.7void doubleClick(String locator)
用途描述 原英文描述
类似于click()方法,该方法是双击一个链接、按钮、多选框或单选框。如果该双击事件导致了新的页面加载(如同链接通常所作的),将调用waitForPageToLoad。
参数: locator - 一个元素定位器 , 页面元素的名称或者ID Double clicks on a link, button, checkbox or radio button. If the double click action
causes a new page to load (like a link usually does), call waitForPageToLoad.
@param locator an element locator
示例:
selenium.doubleClick(“addd”)

2.2.8void clickAt (String locator,String coordString)
用途描述 原英文描述
单击一个链接、按钮、多选框或单选框。如果该双击事件导致了新的页面加载(如同链接通常所作的),将调用waitForPageToLoad。
参数:
·locator - 一个元素定位器, 页面元素的名称或者ID
·coordString – 指定由定位器返回的鼠标事件相关联的元素x,y 坐标(也就是 – 10,20,比如点击鼠标所在区域(纵坐标10、横坐标20),名称为AB的控件 Clicks on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.
@param locator an element locator
@param coordString specifies the x,y position (i.e. - 10,20) of the mouse      event relative  to the element returned by the locator
示例:

Selenium.clickAt(“AB”,”i.e.-10,20”)

2.2.9void focus(String locator)
用途描述 原英文描述
聚焦页面上的指定控件,比如将光标聚焦到需要操作的名称为AB的文本框上 Move the focus to the specified element; for example, if the element is an input field,  move the cursor to that field.
@param locator an <a href="#locators">element locator</a>

示例:

Selenium.focus(“AB”)

2.2.10 void check(String locator)
用途描述 原英文描述
勾选一个关联性按钮(checkbox/radio),若默认是选中的,则什么都不做,若默认不是选中的,则选中,目前该方法不经常被使用,建议使用click方法,参数locator指对应控件的名称,比如选中名称为AB的多选框 Check a toggle-button (checkbox/radio)
@param locator an <a href="#locators">element locator</a>
示例:

Selenium.check(“AB”)

2.2.11 void uncheck(String locator)
用途描述 原英文描述
与上面的check方法恰好相反,是取消选中一个关联性按钮(checkbox/radio),默认若是选中的,则取消,若默认不是选中的,则什么都不干,也不建议使用该方法,当然取决于个人喜好 Check a toggle-button (checkbox/radio)
@param locator an <a href="#locators">element locator</a>
示例:

Selenium.uncheck(“AB”)

2.2.12 void keyPress(String locator,String keySequence)
用途描述 原英文描述
在指定的控件中通过键盘模拟手工按键的情况,一般和其它模拟按键方法组合使用。常用于一些组合键的模拟,如目前IE下的上传控件,就应用了该方法:先将要上传文件的地址复制的剪贴板,然后将光标focus到上传控件,再模拟按下键盘” Ctrl + c” Simulates a user pressing and releasing a key.
@param locator an <a href="#locators">element locator</a>
@param keySequence Either be a string("\" followed by the numeric keycode  of the key to be  pressed, normally the ASCII value of that key), or a single  character. For example: "w",  "\119".
示例:
//在名称为A的控件中输入字符串,”how are you”
Selenium. keyPress(A,”how are you”) 

2.2.13 void shiftKeyDown()
用途描述 原英文描述
按下shift键,并保持按下状态,直到doShiftUp()被调用或一个新的页面被加载,比如我们需要模拟键盘敲个感叹号 “!”,就可以用该方法实现 Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.

示例:

Selenium. shiftKeyDown()

2.2.14 void shiftKeyUp()
用途描述 原英文描述
释放 shift键,与shiftKeyDown()配对使用 Release the shift key.
示例:

Selenium. shiftKeyDp()


2.2.15 void altKeyDown()
用途描述 原英文描述
按下alt键并保持其按下状态,直到doAltUp()被调用或一个新的页面被加载 Press the alt key and hold it down until doAltUp() is called or a new page is loaded
示例:

Selenium. altKeyDown()


2.2.16 void altKeyUp ()
用途描述 原英文描述
释放 alt键,与altKeyDown()配对使用 Release the alt key 

示例:

Selenium. altKeyUp()


2.2.17 void controlKeyDown ()
用途描述 原英文描述
按下ctrl键并保持其按下状态,直到doControlUp()被调用或一个新的页面被加载 Press the control key and hold it down until doControlUp() is called or a new page is loaded.
示例:

Selenium. controlKeyDown()

2.2.18 void controlKeyUp ()
用途描述 原英文描述
释放control键 Release the control key.
示例:

Selenium. controlKeyUp () 

2.2.19 void keyDown (String locator,String keySequence)
用途描述 原英文描述
该方法是按住键盘上的一个键直到该键被释放才能将需要输入的字符串输入到指定的位置上,它需要与keyUp()方法配对使用,这是与keyPress()方法的不同点,通常情况下该方法可以用于敲入ASCILL值或是字符串,比如在指定ID的控件上,按w键 Simulates a user pressing a key (without releasing it yet).
@param locator an <a href="#locators">element locator</a>
@param keySequence Either be a string("\" followed by the numeric keycode  of the key to be  pressed, normally the ASCII value of that key), or a single  character. For example: "w",  "\119".
示例:

Selenium. KeyDown (“ID”,”w”)

2.2.20 void keyUp (String locator,String keySequence)
用途描述 原英文描述
释放按住的键,与KeyDown方法配对使用,使得需要敲入的键完成为止 Simulates a user releasing a key.
@param locator an <a href="#locators">element locator</a>
@param keySequence Either be a string("\" followed by the numeric keycode  of the key to be  pressed, normally the ASCII value of that key), or a single  character. For example: "w",  "\119
示例:

Selenium. KeyDp (String locator,String keySequence)

2.2.21 void setSpeed(String value)
用途描述 原英文描述
设置每个selenium操作间的毫秒延迟长度,默认情况下,没有延迟,比如设置延迟间隔为5ms Simulates keystroke events on the specified element, as though you typed the value key-by- key.
@param value the value to type
示例:

Selenium.setSpeed(5)

2.2.22 void getSpeed()
用途描述 原英文描述
获取每个selenium操作间延迟的长度,默认情况下,没有延迟,也就是延迟为0毫秒 Get execution speed (i.e., get the millisecond length of the delay following each selenium  operation).  By default, there is no such delay, i.e.,the delay is 0 milliseconds.
See also setSpeed.
@return the execution speed in milliseconds.
示例:

Selenium.getSpeed( )

2.2.23 select(String selectLocator,String optionLocator);
用途描述 原英文描述
从一个下拉框中选择一个选项,可以根据下拉框实现方式的不同,按照不同的方法选择指定的元素。如按照label、value、id等匹配页面元素。一般情况下,常用于select的选值。
 参数:     ·selectLocator – 一个用于识别下拉菜单的元素定位器     ·optionLocator – 一个选项选择器(默认为标签) Select an option from a drop-down using an option locator.
<p>
Option locators provide different ways of specifying options of an HTML
Select element (e.g. for selecting a specific option, or for asserting
that the selected option satisfies a specification). There are several
forms of Select Option Locator.
</p><ul><li><strong>label</strong>=<em>labelPattern</em>:
matches options based on their labels, i.e. the visible text. (This
is the default.)
<ul class="first last simple"><li>label=regexp:^[Oo] ther</li></ul></li><li><strong>value</strong>=<em>valuePattern</em>:
matches options based on their values.
<ul class="first last  simple"><li>value=other</li></ul></li><li><strong>id</strong>=<em>id</em>:
matches options based on their ids.
<ul class="first last  simple"><li>id=option1</li></ul></li><li><strong>index</strong>=<em>index</em>:
matches an option based on its index (offset from zero).
<ul class="first last simple"><li>index=2</li></ul></li></ul><p>
If no option locator prefix is provided, the default behaviour is to match on  <strong>label</strong>.
</p>
@param selectLocator an <a href="#locators">element locator</a> identifying a drop-down menu
@param optionLocator an option locator (a label by default)
示例:

Selenium.select (“AB”,“123” )

2.2.24 void selectWindow(String windowID);
用途描述 原英文描述
浏览器的name值并不是我们通常看到浏览器title显示的值,而是通过一个内部函数,赋给浏览器的值,就是window.open(url,windowName,windowFeatures,replaceFlag)中的name值。Selenium通过截取该name值,来获得windows的name值。如该值为空,我们通过name则找不到该窗口。这时就需要通过title等其它方法来查找浏览器窗口。下面是Selenium查找浏览器“windowID”参数对象的方法: 1.)    如果windowID为null,(或是字符串”null”),则假定这个浏览器是最开始打开的浏览器。 2.)    如果”windowID”参数的值是当前应用窗体的一个JavaScript变量名,则假定该变量包含一个由调用JavaScript window.open()函数所产生的返回值。 3.)    如果失败了,将循环遍历所有已知的窗体以便试图找出适合的”title”。由于”title”不是必须唯一,因此可能会产生一些非期望的行为。 如果很难判定你所要操作的窗体的名称,你可以查看为识别通过window.open(被Selenium截取)所打开窗体的名称时所产生的selenium 日志消息。在每个窗体被打开时,你通常可以看到如下信息: debug: window.open call intercepted; window ID (你可以用于 selectWindow()) is “myNewWindow” 在某些情况,Selenium会无法截取window.open的调用(例如,如果该调用发生在”onLoad”事件之间或之前)。(该BUG标记为SEL-339)。在这些情况,你可以使用Selenium的openWindow命令强制Selenium去通告打开窗体的名称,使用一个空(blank) url,像这样:openWindow(“”,”myFunnyWindow”)。

参数:windowID – 要选择窗体的JavaScript 窗体ID Selects a popup window using a window locator; once a popup window has been selected, all commands go to that window. To select the main window again, use null as the target.
<p>
Window locators provide different ways of specifying the window object:
by title, by internal JavaScript "name," or by JavaScript variable.
</p><ul><li><strong>title</strong>=<em>My Special Window</em>:
Finds the window using the text that appears in the title bar.  Be careful;
two windows can share the same title.  If that happens, this locator will
just pick one.
</li><li><strong>name</strong>=<em>myWindow</em>:
Finds the window using its internal JavaScript "name" property.  This is the second
parameter "windowName" passed to the JavaScript method window.open(url, windowName,  windowFeatures, replaceFlag)
(which Selenium intercepts).
</li><li><strong>var</strong>=<em>variableName</em>:
Some pop-up windows are unnamed (anonymous), but are associated with a JavaScript variable name  in the current
application window, e.g. "window.foo = window.open(url);".  In those cases, you can open the  window using
"var=foo".
</li></ul><p>
If no window locator prefix is provided, we'll try to guess what you mean like this:</p><p>1.)  if windowID is null, (or the string "null") then it is assumed the user is referring to the  original window instantiated by the browser).</p><p>2.) if the value of the "windowID"  parameter is a JavaScript variable name in the current application window, then it is assumed
that this variable contains the return value from a call to the JavaScript window.open()  method.</p><p>3.) Otherwise, selenium looks in a hash it maintains that maps string names to  window "names".</p><p>4.) If <em>that</em> fails, we'll try looping over all of the known  windows to try to find the appropriate "title".
Since "title" is not necessarily unique, this may have unexpected behavior.</p><p>If you're  having trouble figuring out the name of a window that you want to manipulate, look at the  Selenium log messages
which identify the names of windows created via window.open (and therefore intercepted by  Selenium).  You will see messages
like the following for each window as it is opened:</p><p><code>debug: window.open call  intercepted; window ID (which you can use with selectWindow()) is "myNewWindow"</code></p><p>In  some cases, Selenium will be unable to intercept a call to window.open (if the call occurs  during or before the "onLoad" event, for example).
(This is bug SEL-339.)  In those cases, you can force Selenium to notice the open window's name  by using the Selenium openWindow command, using
an empty (blank) url, like this: openWindow("", "myFunnyWindow").</p>
@param windowID the JavaScript window ID of the window to select
示例:

Selenium.selectWindow (“123”)

2.2.25 void selectPopUp(String windowID)
用途描述 原英文描述
是一个选择弹出窗口的简化方法,提供的功能类似于selectWindow方法,如果 WindowID没被定义或为“null”,则第一个非顶部窗口默认被选择,然而顶部窗口在被selectWindow方法选择的时候也是没有WindowID的,这在有多个弹出窗口的情况下是不能被选到的,因此window提供如下几种方式来获取到顶部窗口的ID:
使用open方法打开的窗口名称
Javascript定义的变量
Window标题
此方法与selectWindow方法选择窗口的顺序是相同的 Simplifies the process of selecting a popup window (and does not offer functionality beyond what selectWindow() )already provides.windowID is either not specified, or specified as
"null", the first non-top window is selected. The top window is the one that would be selected by selectWindow() without providing a windowID . This should not be used when more than one popup window is in play. Otherwise, the window will be looked up considering windowID as the following in order: 1) the "name" of the window, as specified to window.open(); 2) a javascript variable which is a reference to a window; and 3) the title of the window. This is the same ordered lookup performed by selectWindow
@param windowID an identifier for the popup window, which can take on a number of different meanings
示例:

Selenium.selectPopUp (null)

2.2.26 void deselectPopUp()
用途描述 原英文描述
选择主窗口,该方法相当于selectWindow方法,只是该方法不需要WindowID,主窗口默认ID是空,可以不被标示 Selects the main window. Functionally equivalent to using
<code>selectWindow()</code> and specifying no value for
<code>windowID</code>.
示例:

Selenium.deselectPopUP( )

2.2.27 void selectFrame(String locator)
用途描述 原英文描述
在当前窗口中选择一个Frame窗体,该方法可以多次选择指定的嵌套Frame窗体,如果是选择父Frame窗体,那么将"relative=parent"作为locator,若是选择顶部Frame窗体,则将relative=top作为locator Selects a frame within the current window.  (You may invoke this command multiple times to select nested frames.)  To select the parent frame, use
"relative=parent" as a locator; to select the top frame, use "relative=top".
@param locator an <a href="#locators">element locator</a> identifying a frame or iframe
示例:

Selenium.selecFrame(“"relative=top”)

2.2.28 void waitForPopUp(String windowID,String timeout)
用途描述 原英文描述
等待一个弹出窗体出现和加载。如果超出指定时间,新窗体仍未加载,则报错。如果在指定时间内,新窗体加载成功,则继续执行下一步。
参数:
·windowID – 将出现窗体的JavaScript 窗体ID   ·timeout - 以毫秒为单位,超过后该命令将返回错误 Waits for a popup window to appear and load up.
@param windowID the JavaScript window "name" of the window that will appear (not the text of  the title bar)                 If unspecified, or specified as "null", this command will                  wait for the first non-top window to appear (don't rely                 on this if you  are working with multiple popups                 simultaneously).
@param timeout a timeout in milliseconds, after which the action will return with an error. If this value is not specified, the default Selenium  timeout will be  used. See the setTimeout() command.
示例:

Selenium.waitForPopUp(“12”. “5000”)

2.2.29 void chooseCancelOnNextConfirmation()
用途描述 原英文描述
设置下一个window.confirm()的对话框,模拟用户点击”取消”健。该命令仅设置后续一个confirm对话框的动作。 By default, Selenium's overridden window.confirm() function will return true, as if the user had manually clicked OK; after running this command, the next call to confirm() will return false, as if the user had clicked Cancel.  Selenium will then resume using the default behavior for future confirmations, automatically returning
true (OK) unless/until you explicitly call this command for each confirmation.
Take note - every time a confirmation comes up, you must
consume it with a corresponding getConfirmation, or else
the next selenium operation will fail.
示例:

selenium.chooseCancelOnNextConfirmation( )

2.2.30 void chooseOkOnNextConfirmation()
用途描述 原英文描述
设置下一个window.confirm()的对话框模拟用户点击”确认”健。该命令仅设置后续一个confirm对话框的动作。 Undo the effect of calling chooseCancelOnNextConfirmation.  Note that Selenium's overridden window.confirm() function will normally automatically return true, as if the user had manually clicked OK, so you shouldn't need to use this command unless for some reason you need to change your mind prior to the next confirmation.  After any confirmation, Selenium will resume using  the
default behavior for future confirmations, automatically returning  true (OK) unless/until you explicitly call chooseCancelOnNextConfirmation for each confirmation.Take note - every time a confirmation comes up, you must consume it with a corresponding getConfirmation, or else the next selenium operation will fail.
示例:

selenium.chooseOkOnNextConfirmation( )

2.2.31 void answerOnNextPrompt(String answer)
用途描述 原英文描述
在下次JavaScript弹出prompt提示框时,赋予其anweerString的值,并选择确定 参数: answer – 对弹出的提示所给与的回答 Instructs Selenium to return the specified answer string in response to the next JavaScript prompt [window.prompt()].
@param answer the answer to give in response to the prompt pop-up
示例:

selenium. answerOnNextPrompt (“xxxx” )

2.2.32 void windowFocus()
用途描述 原英文描述
定位到当前窗体 Gives focus to the currently selected window
示例:

selenium. windowFocus()

2.2.33 void windowMaximize()
用途描述 原英文描述
将窗口最大化 Resize currently selected window to take up the entire screen
示例:

selenium. windowMaximize()

2.3.34void waitForCondition(String script,String timeout) 
用途描述 原英文描述
重复执行指定JavaScript片段直到其值为”true”。该片段可以有多行,但只考虑其最后一行的结果。要注意:默认情况下,该片段会在Test Runner的测试窗体运行,而不是在被测对象的窗体运行。要在被测对象的窗体运行,可以使用JavaScript代码selenium.browserbot.getCurrentWindow(),然后让你的JavaScript在那运行。
该方法常用于测试Ajax。
参数:   
·script – 要运行的JavaScript片段
  ·timeout –以毫秒为单位,超过后该命令将返回错误 Runs the specified JavaScript snippet repeatedly until it evaluates to "true".
The snippet may have multiple lines, but only the result of the last linewill be considered.
<p>Note that, by default, the snippet will be run in the runner's test window, not in the  window
of your application.  To get the window of your application, you can use the JavaScript snippet <code>selenium.browserbot.getCurrentWindow()</code>, and then run your JavaScript in there</p>
@param script the JavaScript snippet to run
@param timeout a timeout in milliseconds, after which this command will return with an error
示例:

selenium. waitForCondition(String script,String timeout)

2.3.35void setTimeout(String timeout) 
用途描述 原英文描述
设置selenium完成动作的等待时间,默认超时周期是30毫秒,若超过了设置的值,则报错,参数 timeout是指设置的超时长度 Specifies the amount of time that Selenium will wait for actions to complete.
<p>Actions that require waiting include "open" and the "waitFor*" actions.</p> The default timeout is 30 seconds.@param timeout a timeout in milliseconds, after which the action will return with an erro
示例:

selenium.setTimeout()

2.3.36waitForPageToLoad(String timeout)
用途描述 原英文描述
等待一个新页面的加载时间。 你可以使用此命令以代替”AndWait”后缀,”clickAndWait”,”selectAndWait”,”typeAndWait”等(仅在JS API中有效)。Selenium通常会持续跟踪新页面的加载状态,当其第一次注意到页面加载完成,将会设定一个”newPageLoaded”标志。当此标志变为false后再运行其他Selenium命令。因此,如果你要等待一个页面加载完成,当一个Selenium命令导致一个页面加载后就需立即开始等待。 参数:
·timeout - 以毫秒为单位,超过后该命令将返回错误 Waits for a new page to load.
<p>You can use this command instead of the "AndWait" suffixes,"clickAndWait","selectAndWait","typeAndWait" etc.(which are only available in the JS API).</p><p>Selenium constantly keeps track of
new pages  loading, and sets a "newPageLoaded"
flag when it first notices a page load.  Running any other Selenium command after
turns the flag to false.  Hence, if you want to wait for a page to load, you must
wait immediately after a Selenium command that caused a page-load.</p>
@param timeout a timeout in milliseconds, after which this command will return with an error
示例:

selenium. waitForPageToLoad(“30000“)

2.3.37 waitForFrameToLoad(frameAddress, timeout)
用途描述 原英文描述
等待一个指定的Frame加载,超过指定的时间会超时报错
frameAddress:服务器端返回的frame的地址,timeout:超时时间,毫秒为单位 Waits for a new frame to load.
<p>Selenium constantly keeps track of new pages and frames loading, and sets a "newPageLoaded" flag when it first notices a page load.</p>
See waitForPageToLoad for more information.
@param frameAddress FrameAddress from the server side
@param timeout a timeout in milliseconds, after which this command will return with an error
示例:

selenium. waitForFrameToLoad(“SSF”,“333”)

2.3.38void runScript(String script)
用途描述 原英文描述
运行一段JS脚本
script:js脚本,字符串类型 Creates a new "script" tag in the body of the current test window, and adds the specified text into the body of the command.  Scripts run in this way can often be debugged more easily than scripts executed using Selenium's "getEval" command.  Beware that JS exceptions thrown in these script
tags aren't managed by Selenium, so you should probably wrap your script in try/catch blocks if there is any chance that the script will throw
an exception.
@param script the JavaScript snippet to run
示例:
String pwdJS = "window.document.getElementById(\""+ ui.get("text_FFlgnPwd")"\").TextData=\"000000\";
selenium. runScript(pwdJS);

2.3.39void attachFile(String fieldLocator,String fileLocator)  
用途描述 原英文描述
将本地指定文件赋值给指定的上传控件,只能在firefox下使用fieldLocator:上传控件的属性标识 fileLocator:指定路径的本地文件 Sets a file input (upload) field to the file listed in fileLocator @param fieldLocator an <a href="#locators">element locator</a>
@param fileLocator a URL pointing to the specified file. Before the file  can be set in the  input field (fieldLocator), Selenium RC may need to transfer the file to the local machine  before attaching the file in a web page form. This is common in selenium  grid configurations  where the RC server driving the browser is not the same  machine that started the test.    Supported Browsers: Firefox ("*chrome") only.
示例:

selenium. attachFile("file", "c:\\screenshot.png");

2.3.40void captureScreenshot(String filename)
用途描述 原英文描述
获取一个PNG格式的屏幕快照,保存在filename这个路径下
filename是绝对路径,包含路径和文件名 Captures a PNG screenshot to the specified file.
@param filename the absolute path to the file to be written, e.g. "c:\blah\screenshot.png"
示例:

selenium. captureScreenshot("c:\\screenshot.png");

2.3.41String captureScreenshotToString() 
用途描述 原英文描述
捕获一个PNG格式的快照,并且返回64位编码格式的字符串 Capture a PNG screenshot.  It then returns the file as a base 64 encoded  string.
@return The base 64 encoded string of the screen shot (PNG file)
示例:

selenium. captureScreenshotToString()

Selenium判断预期结果(Assertions)
  验证一个命令的预期结果。常见的断言包括验证页面内容或当前位置是否正确,允许用户去检查当前状态。两种模式: Assert 和 Verify, 当Assert失败,则退出测试;当Verify失败,测试会继续运行 .
  在该目录下包含3个get方法:
getAlet(),  getConfirmation(),  getPrompt(),是由于这3个方法都有判断验证的行为,所以归并到该目录下。
2.3.1 boolean isAlertPresent()   
用途描述 原英文描述
判断是否有alert()弹出框存在,有则返回TRUE,否则返回FALSE,此方法不会抛出异常 Has an alert occurred?
This function never throws an exception
@return true if there is an alert
示例:

Selenium. isAlertPresent()

2.3.2 boolean isPromptPresent()  
用途描述 原英文描述
判断是否有弹出Prompt警告框存在,有则返回TRUE,否则返回FALSE,此方法不会抛出异常 Has a prompt occurred?
This function never throws an exception
@return true if there is a pending prompt
示例:

Selenium. isPromptPresent()

2.3.3boolean isConfirmationPresent() 
用途描述 原英文描述
判断是否有Confirm()确认对话框存在,有则返回TRUE,否则返回FALSE,此方法不会抛出异常 Has confirm() been called?
This function never throws an exception
@return true if there is a pending confirmation
示例:

selenium.isConfirmationPresent()  

2.3.4String getAlert() 
用途描述 原英文描述
检查JavaScript 是否有产生带指定message 的alert 对话框
alert 产生的顺序必须与检查的顺序一致检查alert 时会产生与手动点击'OK'按钮一样的效果。如果一个alert 产生了,而你却没有去检查,selenium 会在下个action 中报错。
注意:Selenium 不支持JavaScript 在onload()事件时调用alert();在这种情况下,Selenium 需要你自己手动来点击OK.当有alert弹出框的时候,可以关闭弹出框 Retrieves the message of a JavaScript alert generated during the previous action, or fail  if there were no alerts.Getting an alert has the same effect as manually clicking OK. If an
alert is generated but you do not consume it with getAlert, the next Selenium
action will fail. Under Selenium, JavaScript alerts will NOT pop up a visible alert
dialog. Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
@return The message of the most recent JavaScript alert
示例:

while(selenium.isAlertPresent()) {       
    selenium.getAlert();       
}

2.3.5String getConfirmation() 
用途描述 原英文描述
检查JavaScript 是否有产生带指定message 的confirmation 对话框和alert 情况一样,confirmation 对话框也必须在它们产生的时候进行检查默认情况下,Selenium 会让confirm() 返回true, 相当于手动点击Ok 按钮的效果。你能够通过
chooseCancelOnNextConfirmation 命令让confirm()返回false.同样地,如果一个cofirmation 对话框出现了,但你却没有检查的话,Selenium 将会在下个action 中报错,注意:在Selenium 的环境下,confirmation 对话框框将不会再出现弹出显式对话框
注意:Selenium 不支持在onload()事件时调用confirmation 对话框,在这种情况下,会出现
显示confirmatioin 对话框,并需要你自己手动点击 Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation,
the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
@return the message of the most recent JavaScript confirmation dialog
示例:

selenium. getConfirmation()

2.3.6String getPrompt() 
用途描述 原英文描述
检查JavaScript 是否有产生Prompt对话框,如果prompt 对话框出现了但你却没有检查,则Selenium 会在下个action 中报错 Retrieves the message of a JavaScript question prompt dialog generated during the previous action.Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail. NOTE: under
Selenium,  JavaScript prompts will NOT pop up a visible
dialog. NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
@return the message of the most recent JavaScript question prompt
示例:

selenium.getPrompt()  

2.3.7boolean isChecked(String locator) 
用途描述 原英文描述
判断(checkbox/radio)  是否被选择,如果元素不存在或不是一个(checkbox/radio),则返回false,若是(checkbox/radio)且被选择则返回true Gets whether a toggle-button (checkbox/radio) is checked.  Fails if the specified element  doesn't exist or isn't a toggle-button.
@param locator an <a href="#locators">element locator</a> pointing to a checkbox or radio  button
@return true if the checkbox is checked, false otherwise
示例:

selenium. isChecked("otherPhoneFlag")

2.3.8boolean isTextPresent(String pattern)
用途描述 原英文描述
检查在当前给用户显示的页面上是否有出现指定的文本,存在true 不存在fasle参数pattern:指定文字字符串 Verifies that the specified text pattern appears somewhere on the rendered page shown to  the user.
@param pattern a <a href="#patterns">pattern</a> to match with the text of the page
@return true if the pattern matches the text, false otherwise
示例:

selenium. isTextPresent(“ok”)  

2.3.9boolean isElementPresent(String locator) 
用途描述 原英文描述
验证指定的页面元素在当前页面是否存在,若存在true ,不存在fasle,参数locator:指定控件的ID Verifies that the specified element is somewhere on the page.
@param locator an <a href="#locators">element locator</a>
@return true if the element is present, false otherwise
示例:

selenium. isElementPresent()

2.3.10boolean isVisible(String locator) 
用途描述 原英文描述
判断指定的控件属性是否可见,可见返回true,不可见返回false,参数
locator:指定控件的ID Determines if the specified element is visible. An element can be rendered invisible by setting the CSS "visibility"property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors.  This method will fail if
the element is not present.
@param locator an <a href="#locators">element locator</a>
@return true if the specified element is visible, false otherwise
示例:

selenium. isVisible(“visit_input”)

2.3.11boolean isEditable(String locator) 
用途描述 原英文描述
判断是否为可编辑的控件,可编辑返回true,不可编辑返回false,参数locator为指定控件的ID Determines whether the specified input element is editable, ie hasn't been disabled.This method will fail if the specified element isn't an input element.
@param locator an <a href="#locators">element locator</a>
@return true if the input element is editable, false otherwise
示例:

selenium. isEditable(“addssg”) 

Selenium常用取值方法 
   用于获取被选中对象的相关属性,比如某窗体的ID,某文本框的文字或一段HTML代码等。
2.4.1String getLocation()
用途描述 原英文描述
获得当前页面的url Gets the absolute URL of the current page.
@return the absolute URL of the current page
示例:

selenium.getLocation() 

2.4.2String getTitle() 
用途描述 原英文描述
获取当前页面的 窗口标题 Gets the title of the current page.
@return the title of the current page
示例:

selenium.getTitle()

2.4.3String getBodyText() 
用途描述 原英文描述
获取的浏览器页面上的文字,不包含html 代码 Gets the entire text of the page.
@return the entire text of the page
示例:

String bodytxt = selenium.getBodyText();

2.4.4String getValue(String locator) 
用途描述 原英文描述
取出某个文本框中已经填写的信息 Gets the (whitespace-trimmed) value of an input field (or anything else with a value  parameter).
For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
@param locator an <a href="#locators">element locator</a>
@return the element value, or "on/off" for checkbox/radio elements
示例:

String fieldValue = selenium.getValue("xpath=//input[@name='addProfileLastName']");

2.4.5String getText(String locator) 
用途描述 原英文描述
获取某页面元素的 text 值。 Gets the text of an element. This works for any element that contains
text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
@param locator an <a href="#locators">element locator</a>
@return the text of the element
示例:

String elementText = selenium. getText("link=Contacts");

2.4.6String getEval(String script) 
用途描述 原英文描述
获取指定的Java Script代码的最后一行代码执行后的返回结果。getEval()方法中的JavasScript代码的this是JavaScript中的Selenium对象,而不是window对象。如果你需要调用当前页面的window对象的方法,你需要直接指出window对象,如:
“window.document.getElementById('foo');”。
请注意这不是Java中的Selenium接口,而是JavaScript中的Selenium对象。JavaScript中的Selenium对象的作用是代表Java中的Selenium接口执行一系列的命令,让浏览器执行。另外,Selenium接口的selectFrame和selectWindow方法可以修改当前Selenium命令的目标窗口。也就是说,当前的window对象会改变。 Gets the result of evaluating the specified JavaScript snippet.  The snippet may have multiple lines, but only the result of the last line will be returned.Note that, by default, the snippet will run in the context of the "selenium"object itself, so <code>this</code> will refer to the Selenium object.  Use <code>window</code>  to refer to the window of your application, e.g. <code>window.document.getElementById ('foo') </code></p><p>If you need to use a locator to refer to a single element in your application page, you can use  <code>this.browserbot.findElement("id=foo")</code> where "id=foo" is your locator.</p>
@param script the JavaScript snippet to run
@return the results of evaluating the snippet
示例:

selenium.getEval("window.document.all('_fmu.l._0.p_ie').TextData='password';");

2.4.7String getTable(String tableCellAddress) 
用途描述 原英文描述
取出表中某个单元格的值,下标从 0 开始
@param table表中单元格的地址 Gets the text from a cell of a table. The cellAddress syntax
tableLocator.row.column, where row and column start at 0.
@param tableCellAddress a cell address, e.g. "foo.1.4"
@return the text from the specified cell
示例:

selenium.gettable(tableCellAddress)

2.4.8String[] getSelectedValues(String selectLocator) 
用途描述 原英文描述
获取单选下拉框或者多选下拉框中已选取的列表值,参数selectLocator指下拉菜单中被选择的元素,所有被选中的值以数组的形式返回 Gets all option values (value attributes) for selected options in the specified select or  multi-select element.
@param selectLocator an <a href="#locators">element locator</a> identifying a drop-down menu
@return an array of all selected option values in the specified select drop-down
示例:

selenium.getSelectedValues(selectLocator)

2.4.9String getSelectedValue(String selectLocator)  
用途描述 原英文描述
获取单选下拉框中已选取的列表值,参数selectLocator指选中下拉菜单中被选择的元素,返回指定的值,该方法返回一个单一值 Gets option value (value attribute) for selected option in the specified select element.
@param selectLocator an <a href="#locators">element locator</a> identifying a drop-down menu
@return the selected option value in the specified select drop-down
示例:

assertEquals("example", selenium.getSelectedValue("xpath=//select[@name='select']")) 

2.4.10String getAttribute(String attributeLocator) 
用途描述 原英文描述
通过xpath表达式匹配获取第一个匹配上的元素的属性值 Gets the value of an element attribute. The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).@param attributeLocator an element locator followed by an @ sign and then the name of the  attribute, e.g. "foo@bar"
@return the value of the specified attribute
示例:

String elementAttribute = selenium.getAttribute("//tr/input/@type") 

2.4.11String[] getAllButtons() 
用途描述 原英文描述
获取当前窗体所有的按钮ID,以数组的形式返回,如果没有ID,则显示为空 Returns the IDs of all buttons on the page.
<p>If a given button has no ID, it will appear as "" in this array.</p>
@return the IDs of all buttons on the page
示例:

String allButtons[] = selenium.getAllButtons() 

2.4.12String[] getAllLinks() 
用途描述 原英文描述
获取当前窗体所有的链接ID,以数组的形式返回,如果没有ID,则显示为空 Returns the IDs of all links on the page.
<p>If a given link has no ID, it will appear as "" in this array.</p>
@return the IDs of all links on the page
示例:

String allLinks = selenium.getAllLinks();

2.4.13String[] getAllFields()  
用途描述 原英文描述
获取当前窗体所有的输入框ID,以数组的形式返回,如果没有ID,则显示为空 Returns the IDs of all input fields on the page.
<p>If a given field has no ID, it will appear as "" in this array.</p>
@return the IDs of all field on the page
示例:

String allFields[] = selenium.getAllFields();

2.4.14String[] getAllWindowIds()  
用途描述 原英文描述
获取当前open对象打开的浏览器及子浏览器的ID值,以数组形式返回 Returns the IDs of all windows that the browser knows about.
@return the IDs of all windows that the browser knows about.
示例:

String allWinIDs[] = selenium.getAllWindowIds();

2.4.15String[] getAllWindowNames() 
用途描述 原英文描述
获取当前open对象打开的浏览器及子浏览器的name值,以数组形式返回 Returns the names of all windows that the browser knows about.
@return the names of all windows that the browser knows about
示例:

selenium.getAllWindowNames()

2.4.16String[] getAllWindowTitles()  
用途描述 原英文描述
获取当前open对象打开的浏览器及子浏览器的窗体title值,以数组形式返回 Returns the titles of all windows that the browser knows about.
@return the titles of all windows that the browser knows about.
示例:

selenium.getAllWindowTitles()

2.4.17String getHtmlSource() 
用途描述 原英文描述
返回当前页面上html标签之间的所有html源码 Returns the entire HTML source between the opening and
closing "html" tags.
@return the entire HTML source
示例:

String htmlRes = selenium.getHtmlSource();
Xpath相关语法
Xpath是以斜线 /、双斜线 //、星号*、前缀符号@等来定位一个文件或控件的路径,是使用Selenium写case的必学语法,关于Xpath网络上资料很多,下面推荐个地方,或参考“新手入门手册”     
 下面的站点也介绍的比较详细,大家可以去参考。
http://www.zvon.org/xxl/XPathTutorial/General_chi/examples.html
下面是关于使用Xpath一个具体例子:
 假设我们需要在页面的一个文本输入框中输入一些内容,然后点击某个按钮,看看页面是否跳转,那这个时候我们需要找到输入内容的文本框位置,和要点击按钮的位置,见下面一段代码:
 public void test1() {
  selenium.open("http://xxx.xxx.xxx/yyy");  
 //在含有属性name且其值为userID的input输入框中输入test-user  
 selenium.type("xpath=//input[@name='userID']", "test-user");   
 //点击含有属性type且其值为button的input元素
 selenium.click("xpath=//input[@type='button']");   
 selenium.waitForPageToLoad("2000");   
assertEquals(selenium.getTitle(), "Welcome");   
 }  
分享到:
评论

相关推荐

    蓝桥杯C、C++专用IDE及API文档

    蓝桥杯C/C++比赛会强制使用Dev作为,专用IDE、并且会附带C/C++的API文档。 该文件内含蓝桥杯专用的IDE编辑器和API文档

    windows sdk api写的ide

    windows sdk api写的ide,用c++语言

    JIDE api帮助文档

    jide 很好的做gui设计技术,在swing基础上发展的,这里是jar文件

    c/c++中文帮助文档(API)

    c/c++中文帮助文档(API),包含c和c++所有的库函数

    xlua api 导出工具 luaide

    导出 XLUA Api 用于luaide 提示 luaide 是vscode上的lua编辑器插件 特性: 代码推断功能 标签标注 代码跳转 代码调试 错误检查 api提示接口(api导出工具:xlua ulua slua cocos2d2.x cocos2d3.x) 方法定义列表 自定义...

    Codeide提示包api.zip

    Cocos Code ide 提示包apii.zip ,用于缺少提示包的 IDE

    ulua tolua api 导出插件 ->luaide

    导出 ulua tolua Api 用于luaide 提示 luaide 是vscode上的lua编辑器插件 特性: 代码推断功能 标签标注 代码跳转 代码调试 错误检查 api提示接口(api导出工具:xlua ulua slua cocos2d2.x cocos2d3.x) 方法定义列表 ...

    Delphi中的IDE--ToolsAPI中文帮助

    Delphi中的IDE--Tools API中文帮助

    cide-api:检查数据收集工具REST API

    CIDE-APP HTTP REST API和混合应用程序为工业后备检查员提供了一种简便的方法来收集有关所进行的企业和检查的信息。API verzus APP身份验证对于REST服务,您不需要Flask-Login。 通常,在Web服务中,您不存储客户端...

    ApiIDe改之理

    Apkide,Android反编译的工具,算是比较好用的一个版本

    Java API文档.docx

    Java API文档是Java编程语言的一部分,它是一组文档,提供了Java编程...在许多集成开发环境(IDE)中,例如Eclipse、NetBeans和IntelliJ IDEA等,都提供了内置的Java API文档浏览器,可以直接查看和搜索Java API文档。

    U8API开发手册(C#版).doc

    直接拷贝这些代码,然后在集成开发环境(IDE)中编辑和编译这些代码,即能实现调用U8标准API。利用这些代码示例时,请按照其中每一步骤的提示说明正确操作,如添加必要的引用、按照自动生成的代码填入正确的参数等。...

    C++ Builder与Windows API 经典范例

    早年收藏的《C++Builder与Windows API经典范例》源代码+可执行文件+程序说明,全部编译测试通过,解压缩后直接使用。包含5章 第一章-文件函数;第二章-位图函数;第三章-窗口函数;第四章-键盘输入函数;第五章 鼠标...

    layaair-ide-api:LayaAir IDE扩展类库

    LayaAirIDE Chrome扩展API

    在Visual Studio 2017中创建 Web API并整合Swagger

    WSDL一直是使Visual Studio等工具和IDE 可以理解Web服务并创建代理类的基础技术。此功能将Web服务的消耗转换为高级任务,封装所有协议详细信息。 这是Swagger的重要性:它可以为REST API做出WSDL已经为Web服务所做...

    JDK API 1.6 中文版 HTML格式可以关联常用IDE eclipse,NETBEANS

    JDK API 1.6 中文版 HTML格式可以关联常用IDE eclipse,NETBEANS 用7-zip 从200M压到7M。

    VB 超级API大全

    MSDN 中只有部分API的使用帮助, 而且并没有可立即复制到IDE中的API声明, 要使用某个函数不但要很好的了解这个函数的调用方法, 而且需要手动把声明转换成相应语言的API声明方式。于是我就将自己以前写的API浏览软件...

    扩展delphi_IDE白皮书

    本文翻译自《extending-the-delphi-ide》PDF文件,该extending-the-delphi-ide.pdf...可用于扩展IDE的API属于“OTAPI”,它是Open Tools API的缩写。本白皮书和示例是为Delphi XE编写的,并使用Delphi XE进行了测试。

    精通Windows.API-函数、接口、编程实例.pdf

    1.2.6 使用图形化IDE建立工程、进行编译 7 1.2.7 “解决方案”与“工程” 8 1.2.8 使用命令行工具编译 8 第2章 Windows API概要 10 2.1 Windows数据类型 10 2.1.1 Windows数据类型示例 10 2.1.2 ...

Global site tag (gtag.js) - Google Analytics