Micro Focus QTP (UFT) Forums
5 Save button QTP - 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: 5 Save button QTP (/Thread-5-Save-button-QTP)



5 Save button QTP - Qtpnew - 09-02-2015

I have 5 save buttons in 5 tabs. The tabs are placed one after the other. My object repository have these added as 5 save buttons with name save 1, save 2, save 3 , save 4, save 5. All are getting highlighted from OR but they are not getting clicked. After spying each button all the properties are same except
Code:
First button
Index 0 html id:=btnSaveTab1 outerhtml:=<input id=""btnSaveTab1"" class=""Button"" onclick=""document.getElementById('a1').click();"" name=""btnSaveTab1"" value=""Save"" type=""button"">",

Second button
"html id:=btnSave "outerhtml:=<input id=""btnSave"" class=""Button"" onclick=""document.getElementById('a2').click();"" value=""Save"" type=""button"">",

Third button
"html id:=", outerhtml:=<input id=""btnSaveTab1"" class=""Button"" onclick=""document.getElementById('a1').click();"" name=""btnSaveTab

Fourth button
"html id:=btnSave outerhtml:=<input id=""btnSave"" class=""Button"" onclick=""document.getElementById('a2').click();"" value=""Save"" type=""button""

5th button
"html id:=", "outerhtml:=<input class=""Button"" onclick=""document.getElementById('a5').click();"" value=""Save"" type=""button"">",



RE: 5 Save button QTP - supputuri - 09-03-2015

So you want to click on the save button which is currently displaying in the page, right?
if the answer is yes, then you can check for "x" & "y" values and if they are >0 then click on the button after highlighting.