Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

xpath query is not validated #332

@kuba--

Description

@kuba--

The issue is related to:

Generally SDK uses 3rd-party package (github.com/antchfx/xpath) to compile xpath queries.
Unfortunately lot of incorrect xpaths passes, e.g.:

    x, err = Compile("//*[@role=\"Return\"]")
    if err != nil {
        t.Fatalf("should be correct but got error %s", err)
    }
    t.Logf("%v\n", x)

    x, err = Compile("BAD")
    if err != nil {
        t.Fatalf("should be correct but got error %s", err)
    }
    t.Logf("%v\n", x)

    x, err = Compile("this is a totally crap. For sure not valid @xpath")
    if err != nil {
        t.Fatalf("should be correct but got error %s", err)
    }
    t.Logf("%v\n", x)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions