Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
At run time, object could not be found by QTP (WinListView)
#1
Solved: 2 Years, 3 Months, 2 Weeks, 3 Days, 1 Hour, 21 Minutes, 19 Seconds ago
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 Files
.doc   Uploadfile-issue-qtp.doc (Size: 94 KB / Downloads: 12)
Reply
#2
Solved: 2 Years, 3 Months, 2 Weeks, 3 Days, 1 Hour, 21 Minutes, 19 Seconds ago
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
Reply
#3
Solved: 2 Years, 3 Months, 2 Weeks, 3 Days, 1 Hour, 21 Minutes, 19 Seconds ago
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 Files
.doc   KavitaHelp.doc (Size: 39 KB / Downloads: 10)
.doc   KavitaHelp1.doc (Size: 31.5 KB / Downloads: 11)
Reply
#4
Solved: 2 Years, 3 Months, 2 Weeks, 3 Days, 1 Hour, 21 Minutes, 19 Seconds ago
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
Reply
#5
Solved: 2 Years, 3 Months, 2 Weeks, 3 Days, 1 Hour, 21 Minutes, 19 Seconds ago
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"
Reply
#6
Solved: 2 Years, 3 Months, 2 Weeks, 3 Days, 1 Hour, 21 Minutes, 19 Seconds ago
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
Reply
#7
Solved: 2 Years, 3 Months, 2 Weeks, 3 Days, 1 Hour, 21 Minutes, 19 Seconds ago
Hi Murali,

Why can't you take help of your colleagues, if the url, UID and PWD is confidential?
Reply
#8
Solved: 2 Years, 3 Months, 2 Weeks, 3 Days, 1 Hour, 21 Minutes, 19 Seconds ago
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
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  QTP not recogonising object during run time Lavanya N 2 997 10-28-2015, 12:46 PM
Last Post: vinod123
  WinListView set item command Shahino007 0 512 10-06-2015, 03:57 PM
Last Post: Shahino007
  Writing to Run time data table Neetha 5 1,759 08-27-2015, 10:18 AM
Last Post: supputuri
  login object not found in object repository Akram 2 1,172 06-01-2015, 07:47 PM
Last Post: babu123
  object was not found in the Object Repository reynard 0 2,122 03-17-2015, 10:54 PM
Last Post: reynard

Forum Jump:


Users browsing this thread: 1 Guest(s)