How do I find xpath for "Invalid License!" text in the HTML code shown

    Invalid License! ```

    Please provide xpath for above code. I am not able to find xpath.

  • You've got several options.

    The simplest and most obvious (assuming there are no other


    elements on the page with the text "Invalid License!") is //strong[text() = "Invalid License!"]

    If that fails, I'd start with //div[id = "content"]/div/div/strong[text()="Invalid License!"]

    If that proves impossible, I'd try finding the button, going to its parent div, then looking within that div for the



    (Caveat: I am not an xpath expert - this is more of a guide to finding the element you need than completely accurate advice)

Log in to reply

Suggested Topics