Using robotframework without locators (Id, class name, Xpath)

Hi @TextSolver34761,

I gather you don’t have access to dev tools because your companies admin team have disabled it through group policy?

  • Stage one is to request they give you access, use required to do your job as justification, you’ll probably need your test manager on board to help you here, because all the suggestions I can offer below will be slower and therefore cost your employer money, your test manager should use that as part of the argument for you getting access (or ask the security team to fund part of your wage, money usually motivates a change in mind from security teams)

Now for some work around ideas:

  • can you install browser extensions? (I’m guessing probably not), If you can there are some extensions that may help search your browser’s extensions for thing like:

    • robot framework
    • xpath
    • css
  • Selenium Library has Get Source,

    • make this the last keyword in your test case then
    • open browser to page and get source
    • paste the source into http://xpather.com/ and develop your xpath to your first navigation and add that step in to your script before Get Source
    • run your test, grab the next source, xpather, add next step, repeat
    • did I mention this is slower than using dev tools? yeah not the fastest way to devop a script…

There’s probably some other work arounds but those are what I can think of quickly,

Dave.

5 Likes