Man, i feel a bit slow even having to ask this, but I’ve spent a good amount of time hunting for it and still haven’t figured it out. What command do i use if i want to locate an object on a page by its xpath reference instead of its Object Repository path?
Like if i wanted to use WebUI.click(), what would be the xpath equivalent of findTestObject()?
I’m not entirely sure what you’re asking. If you want to create TestObject “live” in memory (instead of building them and storing them in the Object Repo) you can use makeTO() (note: you can change to using xpath instead of css if you wish).
Thanks @Brandon_Hein, I think that gets me mostly what I was looking for.
@Russ_Thomas Basically, its for when I’m scripting by hand, and I have to check an attribute or click on a particular element that, for whatever reason, I can find pretty quickly/easily through xpath, but would be a hassle for me to track down in my object repo.
I’m just trying to be efficient with my coding practices, so that i’m as comfortable using xpath to access DOM elements as i am with pulling them into my script from the object repo.
@kazurayam, Nice i didn’t realize you could instantiate and assign objects that way, very cool. I’ll have to read up on that TestObject, that looks useful!