| || |
Dynamically changing objects in Robot Framework
I am currently working on the Robot Framework and using Selenium Libraries to work on a Web Application. In Robot Framework, we identify the objects in the application using the object's elements (locator values). I think this is similar to what is used in Selenium as well.
I am trying to handle dynamically changing objects using this framework and I was hoping someone would be able to guide me on how I can do this. An example of what I am doing is,
There is a section called Yahoo Pulses at the bottom right corner. I want to click on the first link in this frame. This link changes every time the page is opened or refreshed, so the href or linked text value changes as well. Could someone please advice me what would be the best way to handle this using Robot Framework/Selenium.
I thought of capturing the value of the link during runtime and assigning to a variable, but the only keyword that I could identify for getting the value (Get Value) also needs a locator value to be passed to it.
Any information on this would be much appreciated. Thanks!
Re: Dynamically changing objects in Robot Framework
I found a way to test this feature by using the id of the element and using an xpath value. I can't explain yet how the xpath stuff works as I have never worked with it really.
The command is still: clickAndWait. The target is //div[@id='pulsebd']/a/img
I was able to go to any link that was in the pulse box.
A great tool to use to find things like the id is a plugin called firebug for firefox. It's great for web dev and qa alike.
Hope this helps.