issues with building XPath

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kharry
    New Member
    • Feb 2010
    • 6

    issues with building XPath

    I am trying to build xpath for components which do not have any constant parameter. The Ids (or a part of an id) of the components change with every load.

    Is there is a way I can build a xpath for the same?

    For eg: j_id_jsp_100638 1914_1:OldPassword.
    The first part of the id is dynamic but the latter (OldPassword) remains constant.
    Last edited by Niheel; May 5 '10, 08:18 AM. Reason: spelling, grammar, punctuation
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    *[local-name() = 'OldPassword' ]
    ?

    Comment

    • kharry
      New Member
      • Feb 2010
      • 6

      #3
      Thanks for the reply, but it is not working for me.

      I am getting the "[error] Element *[local-name() = 'OldPassword'] not found " error when running in Selenium IDE. Am I missing something here?

      This is a text box and i need to type some text in this.

      Comment

      • Monomachus
        Recognized Expert New Member
        • Apr 2008
        • 127

        #4
        Originally posted by kharry
        Thanks for the reply, but it is not working for me.

        I am getting the "[error] Element *[local-name() = 'OldPassword'] not found " error when running in Selenium IDE. Am I missing something here?

        This is a text box and i need to type some text in this.
        Code:
        *[contains(name(),'OldPassword')]
        I think this should work

        Comment

        Working...