Objects not appearing after i select an item form list

208 views
Skip to first unread message

QTP-Vinod

unread,
Apr 20, 2012, 3:48:53 AM4/20/12
to mercu...@googlegroups.com
Hi All,

After i select an item from a list there are some new objects should appear in the page. But its not happening.
If i refresh the page using page.refresh the item selection goes back to the default selection. When i perform this action manually it works fine.
Please let me know what can be done to solve this issue.

Thanks in advance,
Vinod

Sandeep PL

unread,
Apr 20, 2012, 8:50:05 AM4/20/12
to mercu...@googlegroups.com

Use replay type as mouse,it will solve Ur problem

--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Mitul Jani

unread,
Apr 20, 2012, 9:44:55 AM4/20/12
to mercu...@googlegroups.com
Hi Vinod,

Can you write your question with example please?

because i am new at QTP and i am learning this all new stuff so with URL name

Thanks,
Mitul

--

Anish Pillai

unread,
Apr 22, 2012, 11:49:27 AM4/22/12
to mercu...@googlegroups.com
Hi Vinod,

This happens because sometimes the application waits for some keyboard or mouse event to make some changes. In your example, when you select the item from the list manually using your mouse, the mouse event occurs. So application displays the additional values. So in QTP, you need to simulate the mouse, so that the applications can capture that. Check the below link for more details.

http://knowledgeinbox.com/articles/qtp/settings/when-to-change-qtp-web-replaytype-setting/



--
ar

Madhavi Puli

unread,
Apr 23, 2012, 12:23:40 AM4/23/12
to mercu...@googlegroups.com
hi
 
       this is madhavi am learning qtp i have one problem.while testing naukri page useing internet explorer.while adding the all objects using OR.but qtp anable recognize that object it identifies only internet explorerserver what is the problem can any body tellme.

CHANDANA vodlakonda

unread,
Apr 23, 2012, 9:54:26 AM4/23/12
to mercu...@googlegroups.com
Hi Madhavi,

Check whether addins loaded properly or not and using object spy the objects.

On Sun, Apr 22, 2012 at 11:23 PM, Madhavi Puli <madhu1...@gmail.com> wrote:
hi
 
       this is madhavi am learning qtp i have one problem.while testing naukri page useing internet explorer.while adding the all objects using OR.but qtp anable recognize that object it identifies only internet explorerserver what is the problem can any body tellme.

--

ann hoang

unread,
Apr 23, 2012, 11:51:28 AM4/23/12
to mercu...@googlegroups.com

Hi all,
 
I have some scripts that wrote in win XP to test some app that was written in wpf.
Right after recorded, it showed all line in win xp:
WpfWindow("winName").Move 769,486
WpfWindow("winName").Click 183,104
but in win 7, I couldn't record it and also the existing code run that showed run error
"Object reference not set to an instance of an object.  Function file:......"
Notes: I have add in wpf license
Please advice! many thanks
 

Mitul Jani

unread,
Apr 23, 2012, 4:12:25 PM4/23/12
to mercu...@googlegroups.com
Please try to catch object using Object spry without recording so you will be fine
 
mitul

Mitul Jani

unread,
Apr 23, 2012, 4:14:55 PM4/23/12
to mercu...@googlegroups.com
Hi team,
 
how can i run my for loop for select any value from dropdown value f Amazon All department Web list
here is my code can you help how do i apply for automation login for this Weblist object
can anyone help me for my job
 
 
If Browser("name:=Amazon.com - Your Account").Page("title:=Amazon.com - Your Account").WebList("name:=url","html id:=searchDropdownBox").Exist(4) Then
  a =Browser("name:=Amazon.com - Your Account").Page("title:=Amazon.com - Your Account").WebList("html id:=searchDropdownBox").getRoProperty("items count")
  'msgbox a
'getting list box values
For i=0 to a-1
  msgbox  Browser("name:=Amazon.com - Your Account").Page("title:=Amazon.com - Your Account").WebList("name:=url","html id:=searchDropdownBox").GetItem(i)
Next
End If

On Mon, Apr 23, 2012 at 8:54 AM, CHANDANA vodlakonda <vchan...@gmail.com> wrote:

Kiran Ogeti

unread,
Apr 23, 2012, 5:17:41 PM4/23/12
to mercu...@googlegroups.com
All,

I got to cross verify if value matches but in the range.. could you help below ex:

I search empID as 1000 >> but results might come as employees from 900 to 1100 or sometimes blank.. I got to cross verify that, but I think instr not works here.. any other alternative ??

a = 1000 (input value)
b = anywhere from blank to 1100


Deepak Kumar Mahapatro

unread,
Apr 24, 2012, 12:21:21 AM4/24/12
to mercu...@googlegroups.com
can u please post the code. so it'll be easy to understand. atleast a dummy one

--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en



--
Regards,
Deepak

Madhavi Puli

unread,
Apr 24, 2012, 12:24:09 AM4/24/12
to mercu...@googlegroups.com, vchan...@gmail.com
Hi

    This is madhavi.already i checked all addins are properly checked.i used object spy but it recognize only internet explorer server only.am using qtp 10 trail version.

Deepak Kumar Mahapatro

unread,
Apr 24, 2012, 7:18:00 AM4/24/12
to mercu...@googlegroups.com
Hi Madhavi,

Open internet explorer only after qtp open completely. which version of IE you are using as QTP 10 supports upto IE8 only. check the version of your IE also. it works fine in my system. i attached the screenshot also

On Tue, Apr 24, 2012 at 9:54 AM, Madhavi Puli <madhu1...@gmail.com> wrote:
Hi

    This is madhavi.already i checked all addins are properly checked.i used object spy but it recognize only internet explorer server only.am using qtp 10 trail version.

--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en



--
Regards,
Deepak
Spy.JPG

Deepak Kumar Mahapatro

unread,
Apr 24, 2012, 7:37:31 AM4/24/12
to mercu...@googlegroups.com
Hi Mitul,

try below code
to get the values
With Browser("name:=Amazon.com - Your Account").Page("title:=Amazon.com - Your Account").WebList("name:=url","html id:=searchDropdownBox")
If .Exist(4) Then
arrItems=Split(.getRoProperty("all items"), ";")
MsgBox UBound(arrItems)
a =.getRoProperty("items count")
msgbox a
'getting list box values
For i=1 to a
msgbox .GetItem(i)
wait 2
Next
End If
End With




 to select the values.
With Browser("name:=Amazon.com - Your Account").Page("title:=Amazon.com - Your Account").WebList("name:=url","html id:=searchDropdownBox")
If .Exist(4) Then
a =.getRoProperty("items count")
'getting list box values
For i=0 to a-1
.Select "#"&i
Next
End If
End With
Regards,
Deepak

Mitul Jani

unread,
Apr 24, 2012, 9:26:53 AM4/24/12
to mercu...@googlegroups.com
sure i am going to try and let you know

Thanks team for your help

Kiran Ogeti

unread,
Apr 24, 2012, 10:51:31 AM4/24/12
to mercu...@googlegroups.com
sorry it was confusing.. here the example code:

if instr(1,UserInputData,RealtimeData) then
msgbox "Yes input data exist in realtime data range"

but the problem is "RealtimeData" has a range and the test is whether or not "UserInputData" falls within the range

 lets say if UserInputData = 21, RealtimeData range 10 to 100..--  the test case pass as its within range

but if RealtimeData is 1 to 10 , then test case fail

Pls help

Thx


--- On Tue, 4/24/12, Deepak Kumar Mahapatro <deepakkumar...@gmail.com> wrote:

Anish Pillai

unread,
Apr 24, 2012, 11:07:25 AM4/24/12
to mercu...@googlegroups.com
Hi,

Is this RealtimeData a string? like "10 to 100"? If that is a case then Instr will not work. One way to accomplish this is to find out the upper bound and lower bound first. and then compare with the value.

Eg -

RealtimeData = "100 to 1000"
arrTemp = Split(RealtimeData, " to " )

iLwrBound = CInt(arrTemp(0))
iUprBound = CInt(arrTemp(1))

If UserInputData >= iLwrBound and UserInputData  <= iUprBound Then
  msgbox "value in range"
Else
  msgbox "value not in range"
End If


Hope this helps...
Regards,
Anish Pillai
My QTP Blog

kse...@yahoo.com

unread,
Apr 24, 2012, 11:13:14 AM4/24/12
to mercu...@googlegroups.com
Nope realtimesdata is not a string , but a  range like any value between 10 to 100

Sent from my iPhone

Anish Pillai

unread,
Apr 24, 2012, 11:24:02 AM4/24/12
to mercu...@googlegroups.com
Ok... So the way would be to find the upper and lower limit of this range and then verify that the value lies between this as mentioned above.
ar

kse...@yahoo.com

unread,
Apr 24, 2012, 11:40:43 AM4/24/12
to mercu...@googlegroups.com
Exactly , now the question how to check the value lies in between or not in code 

Sent from my iPhone

Anish Pillai

unread,
Apr 24, 2012, 11:44:26 AM4/24/12
to mercu...@googlegroups.com
Can't that be done using if condition like this...


If UserInputData >= iLwrBound and UserInputData  <= iUprBound Then
  msgbox "value in range"
Else
  msgbox "value not in range"
End If


Anish Pillai

unread,
Apr 24, 2012, 11:45:32 AM4/24/12
to mercu...@googlegroups.com
Can't that be done using If condition as shown below??


If UserInputData >= iLwrBound and UserInputData  <= iUprBound Then
  msgbox "value in range"
Else
  msgbox "value not in range"
End If




kse...@yahoo.com

unread,
Apr 24, 2012, 12:06:30 PM4/24/12
to mercu...@googlegroups.com
Of course we can , I was thinking way too much to find a function like instr , I don't know if any function available for this 



Sent from my iPhone

Mitul Jani

unread,
Apr 24, 2012, 2:16:01 PM4/24/12
to mercu...@googlegroups.com
Hi anish,

When i try to call this function from Action 2 which i created under Action 1 and i already associate this lib file .qfl into Action 1 but when i execute Action one it stop at this Action 2 iteration which line call to this below function from Action 2

I define this function like

SearchDropBox() into Action 2 but it told that it Object is not exist


Function SearchDropBox()
dim i,a
    With Browser("name:=Walmart.com: Save money. Live better.").Page("title:=Walmart.com: Save money. Live better.").WebList("name:=select","select type:=ComboBox Select","html tag:=com.wm.module.305715.select.0")

  If .Exist(4) Then
   a =.getRoProperty("items count")

  For i=0 to a-1
  .Select "#"&i
Next
End If
End With
End Function

On Tue, Apr 24, 2012 at 10:07 AM, Anish Pillai <anish.pi...@gmail.com> wrote:
Hi,

Is this RealtimeData a string? like "10 to 100"? If that is a case then Instr will not work. One way to accomplish this is to find out the upper bound and lower bound first. and then compare with the value.

Eg -

RealtimeData = "100 to 1000"
arrTemp = Split(RealtimeData, " to " )

iLwrBound = CInt(arrTemp(0))
iUprBound = CInt(arrTemp(1))

If UserInputData >= iLwrBound and UserInputData  <= iUprBound Then
  msgbox "value in range"
Else
  msgbox "value not in range"
End If

can you look for me what i did mistake here

Hope this helps...


--
Regards,
Anish Pillai
My QTP Blog

Deepak Kumar Mahapatro

unread,
Apr 24, 2012, 2:23:36 PM4/24/12
to mercu...@googlegroups.com
put function defination in the lib file. execute the lib file at first then use the function name
--
Regards,
Deepak

Mitul Jani

unread,
Apr 24, 2012, 2:28:35 PM4/24/12
to mercu...@googlegroups.com
can you tell me what is function defination? can you tell me

Deepak Kumar Mahapatro

unread,
Apr 24, 2012, 3:06:26 PM4/24/12
to mercu...@googlegroups.com
the complete function code
--
Regards,
Deepak

Mitul Jani

unread,
Apr 24, 2012, 3:50:13 PM4/24/12
to mercu...@googlegroups.com
i just found my mistake so thanks deepak



--

Mitul Jani

unread,
Apr 24, 2012, 5:23:40 PM4/24/12
to mercu...@googlegroups.com
Hi deepak i just want to know when we need to call existing action from another action whithn same test or diff test

please share some anwsers if possible

--

Deepak Kumar Mahapatro

unread,
Apr 25, 2012, 2:22:56 AM4/25/12
to mercu...@googlegroups.com
when code reusability is taken into account means the same way when you are using functions, you can replace that with actions. but the calling syntax is different for each of them.
--
Regards,
Deepak
Reply all
Reply to author
Forward
0 new messages