文章分类 - QTP技巧-XPath相关
摘要: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
阅读全文
摘要: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...
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号