[Help] Copy and Paste using scripts - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions) +--- Thread: [Help] Copy and Paste using scripts (/Thread-Help-Copy-and-Paste-using-scripts) |
[Help] Copy and Paste using scripts - mwietrzyk - 01-12-2012 Hi, Since two days I'm trying to do simple thing. But It does not look so simple with QTP. Namely I want to read an. xml file then store/copy text and paste it in a text fields in a browser. I couldn't find any help. Google says almost nothing about it. First i download a file from Quality Center 'Where to save and resource name Code: saveTo = "C:\PROMPT\QTP" Then update it 'Step 1 - open .xml file and save Code: Const XMLDataFile = "C:\PROMPT\QTP\SCQ_2nd_loop.xml" 'Step 2 - Set fields value Code: Set node = xmlDoc.SelectSingleNode("/ProductMaintenance/ProductMaintenancePlan/ProductMaintenanceQuotation/ProductMaintenanceQuotationNumber") 'Step 3 - Save results xmlDoc.Save(XMLNewFile) Then I read it and make a print log but I don't really know if this point is necessary. Code: Const XMLDataFile = "C:\PROMPT\QTP\SCQ_2nd_loop_update_01.xml" I just need one more point to copy the .xml text and paste it. Thx in advance for your help Matt |