![]() |
|
Problem working with WebCheckBox - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Problem working with WebCheckBox (/Thread-Problem-working-with-WebCheckBox) |
Problem working with WebCheckBox - ngocvo3103 - 11-16-2010 Hi all, I'm doing some exercise on yahoo mail with QTP version 10. The error message comes when I execute my script to delete email: I've tried some other ways to solve this but it only works when I capture interface in the object repository. Can you guys please help me solve this problem with DP?. All helps are appreciated. "Object required: 'checkbox' Function file: D:\QTP\Training\Functions\Yahoo Dynamic Functions.vbs Line (62): " checkbox.Set "ON" And this is my script: Code: Public sub s_Delete_Mail (strSubject)Thanks for reading. Ngoc Vo RE: Problem working with WebCheckBox - KavitaPriyaCR - 11-16-2010 Hi Try the script by removing "set" in the line: Code: "Set checkbox = Browser("name:=^.*Yahoo.*$").Page("title:=^.*Yahoo.*$").WebTable(wTable1).WebTable(inboxtable).ChildItem(row,1,"WebCheckBox",0)"RE: Problem working with WebCheckBox - ngocvo3103 - 11-17-2010 Hi Kavita, Thank you for replying me. I tried removing the "set" in that line, and this time I get this error messenge: Object variable not set Function file: D:\QTP\Training\Functions\Yahoo Dynamic Functions.vbs Line (59): " checkbox = Browser("name:=^.*Yahoo.*$").Page("title:=^.*Yahoo.*$").WebTable(wTable1).WebTable(inboxtable).ChildItem(row,1,"WebCheckBox",0)". I think we cannot do it this way. I'm trying to search on google for pass few days, but there is no result
RE: Problem working with WebCheckBox - KavitaPriyaCR - 11-17-2010 Hi Sorry for not reading your message properly. If you are trying to access the checkbox in the webtable "inboxtable", then please try the below script and let me know if it won't work. Code: Set inboxtable = Description.CreateRE: Problem working with WebCheckBox - ngocvo3103 - 11-17-2010 Hi Kavita, After trying your new solution, I get the same error message Object required: 'checkbox' Function file: D:\QTP\Training\Functions\Yahoo Dynamic Functions.vbs Line (63): " checkbox.Set "ON"". Seems like there are some problems with my QTP, because I've searched on many websites, and found out same solutions for this situation, but when I do it that way, I only get this error message
RE: Problem working with WebCheckBox - KavitaPriyaCR - 11-17-2010 Hi try by changing the variable name "oCheckBox" (anytext other than "checkbox"), because type value for WebCheckBox is checkbox. I think this might be one reason for that error. Please let me know. RE: Problem working with WebCheckBox - ngocvo3103 - 11-17-2010 Hi all, I'm happy to inform you guys that I have found my solution in this situation. I'd like to say "Thank you" to Kavita for helping me (from your solution, I've found my own )Thanks Ngoc Vo RE: Problem working with WebCheckBox - KavitaPriyaCR - 11-17-2010 "WelCome" Ggoc, Good to hear that you found the solution. RE: Problem working with WebCheckBox - john_qa - 11-22-2010 But, can you please share with us, what was your solution. I'm facing almost the same problem. Thanks RE: Problem working with WebCheckBox - ngocvo3103 - 11-26-2010 Hi guys, Sorry for this lately reply because I was so busy in last few days. I'm happy to share with you guys my solution as below Code: Public sub s_Delete_Mail (strSubject) |