Please ensure to include your code between [code][/code] tags while asking or replying to questions.

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

At run time, object could not be found by QTP (WinListView)

11-16-2010, 10:07 PM
Post: #1
Solved: 1 Week, 1 Day, 17 Hours, 24 Minutes, 53 Seconds ago At run time, object could not be found by QTP (WinListView)

Hi,

Application Under Test (UAT) requires a file to be attached. When recording in QTP, the file selection from the Dialog Window is recorded and learned as a WinListView object. However, at run time, this object could not be found by QTP.
Please take a look at it and pass your suggestion on how to work on it.
Code:
Browser("Chronicle Careers").Page("The Chronicle Of Higher").WebRadioGroup("adType").Select "CR"
Browser("Chronicle Careers").Page("The Chronicle Of Higher").Frame("Frame_7").WebFile("uploadfile").Click
Browser("Chronicle Careers").Dialog("Choose File to Upload").WinListView("SysListView32").Select "PDF_file1"
Browser("Chronicle Careers").Dialog("Choose File to Upload").WinButton("Open").Click
Browser("Chronicle Careers").Page("The Chronicle Of Higher").Frame("Frame_7").Image("uploadfile_on").Click

Please see the attachment.
Thanks
-murali


Attached File(s)
.doc  Uploadfile-issue-qtp.doc (Size: 94 KB / Downloads: 12)
Find all posts by this user
Quote this message in a reply
11-17-2010, 11:47 AM
Post: #2
Solved: 1 Week, 1 Day, 17 Hours, 24 Minutes, 53 Seconds ago RE: At run time, object could not be found by QTP (WinListView)
Hi

Can you try once the selecting file option as:
Code:
Browser("Chronicle Careers").Page("The Chronicle Of Higher").WebRadioGroup("adType").Select "CR"
Browser("Chronicle Careers").Page("The Chronicle Of Higher").Frame("Frame_7").Window().Type "c:\path\filename.ppt"
Browser("Chronicle Careers").Page("The Chronicle Of Higher").Frame("Frame_7").Image("uploadfile_on").Click
Find all posts by this user
Quote this message in a reply
11-17-2010, 10:21 PM (This post was last modified: 11-17-2010 10:35 PM by thotamurali.)
Post: #3
Solved: 1 Week, 1 Day, 17 Hours, 24 Minutes, 53 Seconds ago RE: At run time, object could not be found by QTP (WinListView)
hi Kavita

Thanks for looking into it. I am basically a Business Analyst. Recently, working as QA. Thanks for helping me.

I have added the code which you provided and tried.

Code:
Browser("Chronicle Careers").Page("The Chronicle Of Higher").WebRadioGroup("adType").Select "CR"

Browser("Chronicle Careers").Page("The Chronicle Of Higher").Frame("Frame_7").Window().Type "C:\Documents and Settings\mthota\My Documents\Murali\Office\Sprints\diff upload files\PDF_file1.pdf"

Browser("Chronicle Careers").Page("The Chronicle Of Higher").Frame("Frame_7").Image("uploadfile_on").Click

It selected the 1st radio button.
Code:
(WebRadioGroup("adType").Select "CR").

But it didn't open any window or it didn't load any file. It displays like this on my page.
Please see the attachment.
HI kavita,

Please take a look at the screen shot.

Thanks
-murali


Attached File(s)
.doc  KavitaHelp.doc (Size: 39 KB / Downloads: 10)
.doc  KavitaHelp1.doc (Size: 31.5 KB / Downloads: 11)
Find all posts by this user
Quote this message in a reply
11-18-2010, 04:43 AM
Post: #4
Solved: 1 Week, 1 Day, 17 Hours, 24 Minutes, 53 Seconds ago RE: At run time, object could not be found by QTP (WinListView)
Hi Kavita..
Can u plz explain what the diff b/w 1 & 2 i am new to QTP..
1)
Code:
Browser("Chronicle Careers").Page("The Chronicle Of Higher").Frame("Frame_7").WebFile("uploadfile").Click
Murali uses this one.. then how do u think to resolve this..

2)
Code:
Browser("Chronicle Careers").Page("The Chronicle Of Higher").Frame("Frame_7").Window().Type "C:\Documents and Settings\mthota\My Documents\Murali\Office\Sprints\diff upload files\PDF_file1.pdf"

what is Window().Type..

u r help would be appreciated..

Hi Murali,
Code:
Browser("Chronicle Careers").Page("The Chronicle Of Higher").Frame("Frame_7").WebFile("uploadfile").Click
here it doesn't treat "Browse" as Web Button plz check properties of "Browse" it may resolve u r prob..

Thanks
Find all posts by this user
Quote this message in a reply
11-18-2010, 10:43 AM (This post was last modified: 11-18-2010 04:41 PM by KavitaPriyaCR.)
Post: #5
Solved: 1 Week, 1 Day, 17 Hours, 24 Minutes, 53 Seconds ago RE: At run time, object could not be found by QTP (WinListView)
Hi
Murali, I thought your application allows user to type the file name in the browse edit box, thats why i adviced you to type the path and file name, as i am doing in my application.

Nandu, Difference between 2 is ,
In 1st option we are selecting the file from the location by clicking on Browse button.
In 2nd one we can select the file just typing the file name,instead of using browse option.

-------------------------------------------------------------------------------------------------
Hi again Murali,
Include below line(1) in your script before accessing the window objects...
1.
Code:
Set goShell=CreateObject("WScript.Shell")
If still error comes...
Then try by replacing:
Code:
Browser("Chronicle Careers").Dialog("Choose File to Upload").WinListView("SysListView32").Select "PDF_file1"
with below line:
Code:
Browser("Chronicle Careers").Dialog("Choose File to Upload").WinEdit("SysListView32").Set "PDF_file1"
Find all posts by this user
Quote this message in a reply
11-18-2010, 08:47 PM
Post: #6
Solved: 1 Week, 1 Day, 17 Hours, 24 Minutes, 53 Seconds ago RE: At run time, object could not be found by QTP (WinListView)
Thanks Kavita and nandu for looking in to it.

I am totally lost. I am very new to this QTP. My team asked me to work on some scenarios. So learning. I can send the website url, login and passwords. Can you please work on your machine and let me know how this can be fixed.

I really appreciate your help. Please send me your personal email address, so that I can send the url, login and password.

Thanks
-murali
Find all posts by this user
Quote this message in a reply
11-19-2010, 11:52 AM
Post: #7
Solved: 1 Week, 1 Day, 17 Hours, 24 Minutes, 53 Seconds ago RE: At run time, object could not be found by QTP (WinListView)
Hi Murali,

Why can't you take help of your colleagues, if the url, UID and PWD is confidential?
Find all posts by this user
Quote this message in a reply
11-19-2010, 08:46 PM
Post: #8
Solved: 1 Week, 1 Day, 17 Hours, 24 Minutes, 53 Seconds ago RE: At run time, object could not be found by QTP (WinListView)
Hi kavita,

it is not at all any confidential. I am the only one using QTP in my office. So no one knows about it. Anyone go to our site and create their own account. I created one account. I just want to give that info. But I am not sure to post any password/username on this site is a good practice. So I asked your email id.

Please let me know.

Thanks
-murali
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  QTP Takes Long time to Run prasaad44 4 490 04-10-2014 01:53 AM
Last Post: prasaad44
  General run error. Line (18): "Loop while Browser("Index:=0").Object.Busy" AshokReddy 3 491 12-20-2013 01:44 PM
Last Post: sshukla12
Exclamation Getting run time error while executing the QTP script in command prompt. vishruth143 1 1,000 07-15-2013 05:41 PM
Last Post: vinod123
  JavaDialog change every time i run my test Pkapoor 3 566 06-28-2013 09:27 PM
Last Post: Ankur
  Selecting a cell from Javatable at RUN time arjun.singh 7 2,157 05-07-2013 03:26 PM
Last Post: simbolla



User(s) browsing this thread: 1 Guest(s)