how to select a particular object in HTML table ? - 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: how to select a particular object in HTML table ? (/Thread-how-to-select-a-particular-object-in-HTML-table) |
how to select a particular object in HTML table ? - Rachna - 08-05-2009 Hi all, I recorded a script using the below mentioned statement: Code: JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SetCellData "#1","Select","1" Now if i Run the script it throws an error syaing "The operation cannot be performed" if i edit the statement to: Code: JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell "#1" ,"Select" Then also i get the same error. Kindly help me in resolution of the issue. Thanks Rachna RE: how to select a particular object in HTML table ? - basanth27 - 08-05-2009 I see from your subject that you are trying to select a value from the table, but from the code you are trying to set a value to the table. Try this if your intention is only to select a cell, Code: JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell 1 ,"Select" I presume "Select" is the text you want to select from the table ?? Sorry i misled. My bad. Code: JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell 1 ,"Select" "Select" here is the name of the column and 1 is the first row. RE: how to select a particular object in HTML table ? - Rachna - 08-06-2009 hi, Thanks for the quick reply.. but it also didnt work and I am getting the same issue "The operation could not be performed" Kindly provide me a solution for this issue asap. Regards, Rachna RE: how to select a particular object in HTML table ? - basanth27 - 08-06-2009 Try this then, Javatable().Object.SelectCell Cint(1), "Select" RE: how to select a particular object in HTML table ? - Rachna - 08-06-2009 i tried using this: Code: objDescription = JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell Cint(1), "Select" It is giving syntax error. and says the run cannot be completed Expected end of statement Line (117): "objDescription = JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell Cint("1"), "Select"". RE: how to select a particular object in HTML table ? - basanth27 - 08-06-2009 It would for sure, Since you are selecting a cell and there is no return value for it. Please try with assigning a variable. Just like this, Code: JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell Cint(1), "Select" RE: how to select a particular object in HTML table ? - Rachna - 08-06-2009 Code: JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell Cint(1), "Select" Please ssee the screen shot attached...here from the pop up i need to select the first option in the popup RE: how to select a particular object in HTML table ? - basanth27 - 08-06-2009 Thanks rachana. It would be more helpful if you can load the spy shot of the object you want to select. That can help me to drill further. RE: how to select a particular object in HTML table ? - Rachna - 08-06-2009 please find spy shot attached. |