Issues in recognizing HTML5 objects using UFT / Issues in recognizing objects on Resp
I am trying to automate SAP Hybris C4C (Cloud 4 Customer) application but more than 50% of the objects are NOT getting recognized by UFT.
I have 2 versions of the application - 1. HTML5 and 2. Responsive UI
In both the versions the issues exist.
Please help me out with a way to Record/Run the tests using UFT
Which add-in's have you got enabled?
... just another Tester ...
Use your Object Repository manager to search for the HTML5 objects. Load the page create a new repository. Select add new object and select an object on the page. Move your selection to the Page level when you hit ok you will get an option set what object types you want to find.
What you find is the HTML5 objects are all there after the scan save the objects from here you will need to code the steps required.
For some you may need to use .object to get a bit deeper.
Rule 1 don't record.
Off topic, but why is this rule 1?
Originally Posted by ifraser
Recording creates the most unreliable scripts that's why.
Originally Posted by MTerpstra
You might want to reexamine the assumption that the app is HTML 5.
In my experience, Generally all HTML elements, even the most custom ones are recognizable as one of the HTML base elements (div, spans, etc...)
When you get situations where you cannot peek into the web element's properties, and you have your automation tool setup correctly, you're probably seeing one of the following situation.
2. The site is really a native application running inside a browser plugin. You see this often with Java, Flash, ActiveX, and Silverlight. In this case you'll most likely see them appear as <object>, <applet> or <embed> tags.
3. If it's being recognized as a Native object (and not even an html tag for its parent), then you're SOL. This is probably a floating element injected by an outside process. This technique is used by adware to do things like coverup content on a webpage with their own content, etc...
Last edited by dlai; 06-06-2016 at 01:50 PM.
Thank you very much. I could now see I can add the Objects I NEED and write the script line by line which is fine.
But, most of the objects on the application are being recognized/added as "WebElement" and this goes missing when I try to 'Highlight' in the application.
I am not able to program the bloody WebElements as though they are there in repository I am not able to locate them back in the Application.
Any help please ??
Guys just to be more clear, I am worried about ONLY the WebElement and WebTable objects which I am not able to program. Their properties (I think) are changing everytime. When I could highlight a WebElement now, the next time it is NOT available in repository!
Not sure what is going worng. Any help will be much appreciated.
It sounds like one of the properties that's used in the identification of the webelements and webtables is dynamic. You'll have to figure out which property that is and use a different property for identification or use a regular expression for the value of that property. It might be helpful to use the object spy on one of the objects and copy all the properties. Paste them into a text editor of your choice for later reference. Close the browser, open a new one, go to the same place in the application and do it again. Compare the properties from the first spy session to the second and you should be able to see the differences.