Forum Discussion

soniaansari's avatar
soniaansari
New Member
10 years ago

Can I use Absolute XPath with FindChildByXpath to locate an element?

Can I use Absolute XPath with FindChildByXpath to locate an element? My xpath does not have property value

Example Xpath: /html/body/div/fp-landing-panel/section/div[1]/a

  • djadhav's avatar
    djadhav
    Regular Contributor

    Yes, you can. Here is an example.

     

    SET chld = pnl_Config.FindChildByXPath(".//*[@id='12345']/span/span[1]")
    IF chld.Exists THEN
    'Code 1
    ELSE
    'Code 2
    END IF