QTP datasheet Help - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: QTP datasheet Help (/Thread-QTP-datasheet-Help) |
QTP datasheet Help - Brian T. - 06-04-2010 Hi Ankur, I would like to know how to get specific text from a web base application and insert it in a specific cell location of a local datasheet to be reused in other scripts. Example: the application I'm working with will generate a user ID, this User ID is displayed in a comment field on a web page. I would like to capture the generated User ID and have it inserted in a specific cell of the local datasheet. The local datasheet is imported everytime the test runs so the cell's value will always change from test to test. Also I will need to know how to retrieve that ID from that specific cell to reuse in future test. Thank You. RE: QTP datasheet Help - Saket - 06-05-2010 what you can do is add a parameter(UserID) in the datatable after importing the sheet, retrieve the userid from your page using GetROProperty like if the field is webelement then use it like .GetROProperty("innertext") insert the userid captured into the parameter added in the datatable using Datatable("UserID",dtlocalsheet) = Value same way you can retieve from datatable hope this helps you to start with, try and let us know if you have any issues. RE: QTP datasheet Help - Brian T. - 06-05-2010 Thank You Saket this was helpful, just wanted to give you a little more info. The data I'm trying to retreive is in a webelement field and I have a UserID parameter in my datatable. The ID i'm trying to retrieve is not the only data in that field here is an example of what would be in that field and how do I just capture the ADID and insert it in the UserID parameter of the datable......... test request for fixes; test; ADID=XXX4XXX . Default Password=XXX-XXXXXXX The ADID will always change from test to test but it will always be displayed after ADID= Thanks, Brian RE: QTP datasheet Help - Saket - 06-10-2010 Parsing the string should help - Code: Str = "test request for fixes; test; ADID=XXX4XXX . Default Password=XXX-XXXXXXX" |