This post is in part 2 of the series in XML, HTML and QTP. Here we will discuss in detail about using XML Checkpoints in QTP (UFT). In part 1 we discussed about the basics of XML, HTML and differences between them. For part 1, please refer XML and QTP Part1.
Broadly speaking, with QTP, XML can be used in two ways:
As an XML checkpoint. – This is the topic for today’s post OR User-defined external environment variables. – This will be covered in the next post.
For all the examples in this post, we will use http://www.w3schools.com/XML/simple.xml
XML checkpoints are further classified into 3 types:
- XML Web Page/Frame Checkpoint. Checks an XML document within a Web page or frame.
- XML File Checkpoint. Checks a specified XML file.
- XML Test Object Checkpoint. Checks the XML data for an object or operation.
So how can we insert an XML Checkpoint?
Simple start recording. Insert > XML Checkpoint(From Application- In case of Web Page checkpoint) OR XML Checkpoint (From Resource – In case of File/Test object Checkpoint) and point the ‘hand’ on your application, in our case on http://www.w3schools.com/XML/simple.xml. You will get something like this:
Click on the button (as shown above) to parameterize the values of corresponding elements.
Here are some of the common uses of XML checkpoint:
- It can be used to verify data changes across builds.
- It can be used to verify whether the structure(hierarchy) of the XML file matches to with the schema. Change of structure of an XML file can lead to problems in processing XML file.
Some points to note about XML checkpoints:
- The only difference between XML Web Page/Frame Checkpoint and XML File Checkpoint is that the former can be done only during recording and can be done on an LIVE application while in the case of latter, checkpoint can be inserted from the files residing on your hard disk.
- In the case of XML Test Object checkpoint, a drop down named “Method Name” comes up, if you select a WebServiceTest Object (as shown in the image)
- You can also use relative paths while ‘browsing’ for a file using XML File checkpoints.
- You can’t insert an XML checkpoint from Active screen
There is much more to XML then that we have discussed yet. In future posts, I intend to cover the advanced topics on XML.
Hello Ankur,
If any browser application takes around 10 mins to open which sync method should we use?
@Pallavi: Fire the developers! 🙂
I want to automate a web application developed in angularjs.
Which version of qtp will recognise the objects of this application
@Parimala: AngularJS is a client side JS framework. AngularJS version 1.3 is supported by UFT 12.02 and above. You may want to use extensibility.
Hi all, please help me – I am working on UFT 11.53. I noticed that UFT is unable to create XML check point if the XML file has the symbol “&” eg: & abc guide . We get a popup saying like “file is not in proper format”. When we remove that ampersand “&” then it creates xml checkpoint successfully.
Please any suggestion?
thanks in advance
asreddy
hi ankur how we could automate moving images in qtp. like flash and how could we automate tooltip.
@ganesh: Just Object spy on them. Your required value must have been captured by one of the properties in Spy.
Hi laxmijhosna,
I am not able to understanding, can you explain how to create checkpoints through xml
Hi Could you please advise how I can validate Schemas in the check point.
Hi Papu
i had a similer problem where i was not able to do a xml checkpoint. And i was getting “The object you selected does not support this operation”. i think the problem is inn webpage which is not updated for the latest browser . if you run the website in compatibility mode/View for older browser then you should be able to do the checkpoint. Thanks
Faraz
Hi Ankur,
I have a JAVA application where in the XML xhexkpoint is failing. When I check the XML checkpoint results, I see the error “Element is missing”. Can you please help me resolve this issue
I have tried put a Accessability Checkpoint (After opening IE browser for Yahoo home page). But I am geting an error which says “The object you selected does not support this operation”. This is happening even to XML checkpoint also. I have tried to click on different areas of the application but the result is same.t.
Can you please let me know where am doing wrong.Your help is appreciated.
Thanks,
Rajee
XML checkpoints is a very important validation in today’s automation requirement with ERP claiming a high degree of market application. Can u take an end to end flow and utilize this feature.
How do I update XML file (which is the input file for recording in QTP) using Excel or Data Table for a particular XML tag
Hi Ankur,
have tried put a XML check point(From Application) after opning the above URL I am geting an error which says The object you selected does not support this operation”. I have tried to click on different areas of the application but the result is same.t.
Can you please let me know where am doing wrong.Your help is appreciated.
Thanks,
Suman
I need to copy an xml file to a web element text box .
How do you load the contents of an xml file to a variable? What is a good reference to work with xml files?
Hi Ankur and Venkat
In order to automate the CAPTCHA ,there are some third party softwares which can extract the text from the CAPTCHA and provide you the facility to automate.
Yes It can be automate.google it for more info.
Thanks
Suresh
Hi Ankur,
Can you tell me if we can access the xml present in database query results through QTP?
Hi Ankur,
I have tried put a XML check point(From Application) after opning the above URL I am geting an error which says The object you selected does not support this operation”. I have tried to click on different areas of the application but the result is same.Also I have checked http://www.w3schools.com/XML page but get the same result.Can you please let me know where am doing wrong.Your help is appreciated.
Thanks.
This is Venkat, Sorry for using this area to asking question.
The basic reason behind the CAPTCHA was prevent automated system but the value is showing in view source of the page for one site. for gmail and yahoo the value of captcha is not showing view source. I suppose we can automate this one from view source page. What do you say?
@laxmi: For posting questions on the forum you need to register first. You can find a ‘register’ link on top of the forum. As of now forum is related to QTP.
@Venkat: Single word answer is NO. The basic reason behind CAPTCHAS was to prevent automated systems from doing automated login/submission.
For further queries please use Testing Tools forum.
Hi Ankur, This is Venkat. While browsing on human validation I found the value of the Captcha image value in view source of the page. Using QTP can we automate this Captcha image value from view page source?
http://learnloadrunner.com/forums/
in this i didnt get any post question option and is it related to loadrunner?
if u dont mine can u tell me how to post a question?
@laxmi:
May I know the problem you are facing while posting on forums?
Also, how do you recognize ANY text in a word document?
Hai Anukar this is laxmi
i want to ask a question sorry
i am unable to post this in testing forums
see suppose in a word document
i want to recognize the text which is in some diff colore suppose in red color.can u tell me the script for this.my mail id is
laxmijyoshna@gmail.com