htmlcssselenium-webdriverxpathfirefox-developer-tools

How do you verify xpath or css selector in firefox?


IN the long before time, I used fire-path plugin in firefox to verify if my selector would find all the elements that I needed for selenium tests, but I cannot figure out how to do this in the current firefox development tools. and yes I have looked but didn't' find the answer that I was looking for. Everything I find is over 5 years ago and doesn't address Firefox Developer tools. Inspecting a specific elements paths or css is easy, but then how do you get the list of elements?


Solution

  • For XPath you can use

    $x("xpath")
    

    and for CSS selectors you can use

    $$("css selector")
    

    For more so called Web Console Helpers, see the docs.