Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

XPATH: Finding text inside the selector

  • 15-05-2017 8:11pm
    #1
    Registered Users, Registered Users 2 Posts: 5,660 ✭✭✭


    Below xpath up to the word overview is found fine in the document
    .//*[@class='report-container' and not(contains(@style,     "none"))]/descendant::*[contains(@class, 'table-patient-report-overview')]/descendant::table/tbody /tr[ td[descendant-or-self::*[text()='Site-1-R-4-PatientsReport-7782']] and td[descendant-or-self::*[text()[normalize-space()='2']]] and td[descendant-or-self::*[text()[normalize-space()='2']]] and td[descendant-or-self::*[text()[normalize-space()='1']]] and td[descendant-or-self::*[text()[normalize-space()='0']]] ]
    

    However, i need to get the text for Site-1-R-4-PatientsReport-7782. This is also in the document albeit elsewhere. What would be a most efficient xpath selector to dig it out?

    Sorry still getting used to xpaths so please advise if i can make this clearer


Comments

  • Registered Users, Registered Users 2 Posts: 1,367 ✭✭✭nullObjects


    I think it might just be the syntax that's catching you, try "/text()" maybe?

    If you could post some of the html that might help (obviously you might not be allowed to!)


Advertisement