Getting Error Object Required In Qtp
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of object required error in qtp childitem this site About Us Learn more about Stack Overflow the company Business Learn
Object Required Wscript Error Qtp
more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Object Required error in QTP up vote 1 down vote favorite I am trying to click on 3rd link in a cell(2,3) of a web table(Emp Index) Set EditLink = Browser("Browser").Page("Page").WebTable("Emp Index").ChildItem(2,3,"Link",2) EditLink.Click While running the script QTP displaying "Object required: Line(2) EditLink.click" error. any body can u please assist on this. vbscript qtp share|improve this question asked Feb 23 '13 at 8:03 Sekhar 113 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted This error is returned when the cell exists and there are childobjects of type link, but not with this index (3). Try to see if you can confirm that the link with index 0 exists by: Set EditLink = Browser("Browser").Page("Page").WebTable("Emp Index").ChildItem(2,3,"Link",0) MsgBox EditLink.Exist(0) To see where that link is placed on your page, you can use EditLink.Highlight From this point you can start debugging to see if the link with index 1, 2 and finally 3 exists. share|improve this answer answered Feb 25 '13 at 12:37 AutomatedChaos 4,906932 add a comment| up vote 0 down vote Try using a function to click link in a webtable. Check this link. share|improve this answer answered Apr 25 '13 at 1:38 Ian 3,70422044 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the
« Previous 1 ... 23 24 25 26 27 ... 86 Next » Object Required Error Thread Rating: 0 Vote(s) - 0 Average 1 2 3 4 5 Thread Modes Object Required Error branjitk Junior Member Posts: 16 Threads: 9 Joined: Jun 2012 Reputation: 0 #1 06-06-2012, 06:13 PM Hi I am having the problem for Object Required Error. I want to increment the index property for WebElement,For index property "0" it is doing good. While i am increment the index property it says object required. The below code is used for this. Code: l=0
Do while Browser("Browser").Page("ShipmentLink - http://stackoverflow.com/questions/15038490/object-required-error-in-qtp Sailing_2").WebTable("Seq_2").ChildItem(a_rows, a_cols, "WebElement", l).Exist(5)
Set objChildItem = Browser("Browser").Page("ShipmentLink - Sailing_2").WebTable("Seq_2").ChildItem(a_rows, a_cols, "WebElement",l)
objChildItem.Click
l = l+1
Loop Please Can anyone tell me the solution for this. Regards, Ranjit Kumar.B Find Reply anil2u Junior Member Posts: 42 Threads: 6 Joined: Oct 2011 Reputation: 0 #2 06-06-2012, 07:14 PM Hi, If u are having only one webelement in the cell, don't iterate the index property in childitem, http://www.learnqtp.com/forums/Thread-Object-Required-Error--6439 as it will search for that particular indexed webelement in that cell and not finding any, it will return an error. Just put it as 0 & try. Let me know if any info. is needed. Regards Find Reply branjitk Junior Member Posts: 16 Threads: 9 Joined: Jun 2012 Reputation: 0 #3 06-07-2012, 10:08 AM Hi anil, Thankyou for your reply, For "0" it is working,But in my webtable 5 rows and for every row one element is there.i want to click on each webElement in each row. Thanks & Regards, Ranjit Kumar.B Find Reply sshukla12 Senior Member Posts: 426 Threads: 4 Joined: Aug 2011 Reputation: 0 #4 06-07-2012, 10:22 AM Hi, U have 5 rows in ur webtable , so intead of increasing the index number try to increment the row and check if same coulmn is used try something like this: Code: Do while Browser("Browser").Page("ShipmentLink - Sailing_2").WebTable("Seq_2").ChildItem(I, a_cols, "WebElement", 0).Exist(5)
Set objChildItem = Browser("Browser").Page("ShipmentLink - Sailing_2").WebTable("Seq_2").ChildItem(I, a_cols, "WebElement",0)
objChildItem.Click
l = l+1
Loop I am assuming that weblement is present in same column no. for each row.U can increment the index when more than one item present in same cell. Let me know for more clarifications Regards
(עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsRepositoryCommunityForumsBlog Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: when run VB script with QTP, the error appear"Object required: 'wscript'",please help me Scripting > The Official Scripting Guys Forum! Question 0 Sign in to https://social.technet.microsoft.com/Forums/scriptcenter/en-US/d2a9f355-8a19-4271-985e-024b5ccfc715/when-run-vb-script-with-qtp-the-error-appearobject-required-wscriptplease-help-me?forum=ITCG vote My codes is the following: Set WshShell = CreateObject("WScript.Shell") WshShell.Run "calc" WScript.Sleep 100 http://www.sqaforums.com/forums/hp-unified-functional-testing-uft-mercury-quicktest-pro-qtp/147248-object-required-error-vbs-file.html WshShell.AppActivate "Calculator" WScript.Sleep 100 ........ When run to the step "WScript.Sleep 100", the error will appear "Object required:'wscript'". I don't know why the error appear, I think my codes should not have problem, Please help me solve the problem, I will thank you very much. Remark: The question is posted other forums, other guys tell me the wscript.exe object required may be not installed on my system at C:\WINDOWS\system32, but I checked the directory, I found the wscript.exe file, so I don't know why the error appear when run the codes. the error also appear on other computers. Tuesday, August 16, 2011 2:58 PM Reply | Quote Answers 0 Sign in to vote I'm sorry, but I don't know what QTP is. I googled it and found a reference to an HP Quick Test getting error object Pro. If that's it, the problem is probably that it is trying to run your script under IE, rather than the Wscript Host. That is, the WScript object is only instantiated by Wscript.exe or cscript.exe (the two WHS host programs). VBS in IE or as an HTA does not support that object. Your script must be executed as a standalone .VBS or .WSH file to use the Sleep function (and ECHO). At least, that's my best guess at what the problem could be.Tom Lavedas Marked as answer by Richard MuellerMVP, Moderator Friday, September 02, 2011 1:29 AM Tuesday, August 16, 2011 3:21 PM Reply | Quote Moderator All replies 0 Sign in to vote I'm sorry, but I don't know what QTP is. I googled it and found a reference to an HP Quick Test Pro. If that's it, the problem is probably that it is trying to run your script under IE, rather than the Wscript Host. That is, the WScript object is only instantiated by Wscript.exe or cscript.exe (the two WHS host programs). VBS in IE or as an HTA does not support that object. Your script must be executed as a standalone .VBS or .WSH file to use the Sleep function (and ECHO). At least, that's my best guess at what the problem could be.Tom Lavedas Mark
Mark Forums Read Quick Links Today's Posts View Site Leaders Mailing Lists User Tagging Statistics Hash Tag Subscriptions Thanks / Like Statistics Hottest Threads / Posts Advanced Search Blogs Mailing Lists Remember Me? Forum Testing Tools HP Unified Functional Testing UFT / Mercury QuickTest Pro QTP Object Required error in vbs file SPONSORS: Tweet User Tag List Results 1 to 3 of 3 Thread: Object Required error in vbs file LinkBack LinkBack URL About LinkBacks Bookmark & Share Digg this Thread!Add Thread to del.icio.usBookmark in TechnoratiTweet this thread Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 11-14-2012,01:28 AM #1 Rastek Member Join Date Dec 2010 Location Istanbul Posts 292 Post Thanks / Like Thanks (Given) 0 Thanks (Received) 0 Likes (Given) 0 Likes (Received) 0 Dislikes (Given) 0 Dislikes (Received) 0 Mentioned 0 Post(s) Tagged 0 Thread(s) Object Required error in vbs file Hi, I want run a DP script in vbs instead of QTP, in order to close Security warning. I can close Security Scripts withing QTP (not via recovery but just a function) I do not know how can I use DOM objects inside a vbs instead of a QTP file. I want to run same code outside the QTP in a vbs file. When I run the code below I got the error Line : 3 Char :1 Error:Object Required 'Description` try = ".*" Dim myDialog Set myDialog=Description.Create myDialog("micclass").value="Dialog" Set Button=Description.Create Button("micclass").value="WinButton" Button("text")= try&"Yes" Set NButton=myDialog("regexpwndtitle:=Security .*").ChildObjects(Button) NButton(0).click Share Share this post on Digg Del.icio.us Technorati Twitter I look serious because I am serious. Reply With Quote 11-15-2012,08:57 AM #2 bklabel1 SQA Knight Join Date Sep 2012 Location Kew Gardens, United States Posts 2,580 Post Thanks / Like Thanks (Given) 10 Thanks (Received) 11 Likes (Given) 0 Likes (Received) 0 Dislikes (Given) 0 Dislikes (Received) 0 Blog Entries1Mentioned 2 Post(s) Tagged 2 Thread(s) Re: Object Required error in vbs file Are you putting this code in a .vbs file and then finding that it does not understand the QTP syntax? I cannot tell what what your question is. Share Share th