1 2 3 4 5 ··· 11 下一页
摘要: Below is the C# code used to create our sample web service:namespace RelevantCodes.TestingWebServices{ using System; using System.Web.Services; using System.Xml; using System.Xml.Serialization; using System.Text; [WebService(Namespace = "localhost")] [WebServiceBinding(ConformsTo = WsiProf 阅读全文
posted @ 2013-11-22 20:18 dushuai 阅读(162) 评论(0) 推荐(0) 编辑
摘要: MethodDescriptionopen(method, URL) open(method, URL, async) open(method, URL, async, username) open(method, URL, async, username, password)Specifies the arguments and other optional attributes of a request. Method parameter can be one of the following, or other HTTP methods: • DELET... 阅读全文
posted @ 2013-11-22 16:33 dushuai 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Set Obj = ORUtil.GetObject("Browser(""Browser"")")'Update one of the propertiesObj.SetTOProperty "title", "this is set using API"'Update the object we have changedORUtil.Update obj'Save the object repository changesORUtil.SaveSet Obj = No 阅读全文
posted @ 2013-11-22 09:01 dushuai 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Dim ORUtil'Create the object repository automation APISet ORUtil = CreateObject("Mercury.ObjectRepositoryUtil")'Load the object repositoryORUtil.Load "C:\temp\SharedOR.tsr"'Get all the objects with class as WebTableSet allTableObjects = ORUtil.GetAllObjectsByClass(&qu 阅读全文
posted @ 2013-11-22 08:57 dushuai 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Example 1: John SmithJohn Smith is within the H4 tag. Its TEXT value is used to implement Object Indentification in this example. Below is the target HTML used: John Smith CSS:1. h4[innertext~='John']Note: This Selector works in IE, not Firefox.2. h4:first-of-type3. h4[innertext*='John&# 阅读全文
posted @ 2013-11-21 21:47 dushuai 阅读(270) 评论(0) 推荐(0) 编辑
摘要: To understand how CSS Selectors work, let's use the following web page as an example: CSS John Smith View ID View Address View Phone Number Anne Anderson View ID ... 阅读全文
posted @ 2013-11-21 20:05 dushuai 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Example 1:Use Button 3 to climb up to its TABLEThis is similar to example we saw in the section 'Select Parent Nodes using Children' but instead of using the XPath expression /..,we will use axes.The target HTML and XPath axis is shown below: "!-- destination --> View ID View Address 阅读全文
posted @ 2013-11-21 12:29 dushuai 阅读(340) 评论(0) 推荐(0) 编辑
摘要: AxisNameDescriptionancestorSelect all parent nodes(ancestor: parent,grandparent etc) of the current node.ancestor-or-selfSelect all parent nodes(ancestor: parent,grandparent etc) of the current node and the node itself.attributeContains all attributes of the current node.childContains the childre... 阅读全文
posted @ 2013-11-21 09:36 dushuai 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Example 1: View ID View Address View Phone Number In QTP:'Select the PARENT table of Button 6Browser("XPath").WebElement("xpath:=((//INPUT[@value='Button 6'])[1])/../../..").Click 阅读全文
posted @ 2013-11-21 09:11 dushuai 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Example 1: John Smith Anne AndersonIn QTP:'Selecting John SmithBrowser("XPath").WebElement("xpath:=//h4[1]").Click'Selecting Anne AndersonBrowser("XPath").WebElement("xpath:==/h4[contains(text(), 'Anne')]").Click)Example 2:XPath:1. (//tr[@class 阅读全文
posted @ 2013-11-21 09:02 dushuai 阅读(1138) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 11 下一页