Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to distinguish objects via other properties than shown via Object Spy?
#1
Not Solved Question 
I'm recording QTP scripts in a web application that is mainly built in javascript. When clicking on a menu (dropdown style) there are eight choices in the menu, but only some of them are active (clickable) and this is based on which brand you have chosen in an earlier page of the application.

When spying at one of the choices/objects in the dropdown menu (via ObjectSpy) both when the object is clickable and not clickable there are no differences in the QTP Test Object properties and the QTP Run-Time Object properties. Therefore I'm not sure how to make my QTP script know if the menu object is clickable or not.

How can I distinguish objects except for via the object property values that are shown in Object Spy?

When looking at the webpage source code of the menu object there are differences in the values for "isPermitted" and "class" (see code below), but is there a way to pick-up this difference into my QTP script?

Object when inactive and not clickable:
Code:
<div style="pixelWidth:300" value="10:02" id="31" title="Drop-down Choice 1" isPermitted="false" typeId="1         " path="null" class='menuItemDisabled'  onclick="ShowMenu(SelectorContainer4);Do('31')" /><noBr>Drop-down Choice 1</noBr></div>


Object when active and clickable:
Code:
<div style="pixelWidth:300" value="10:02" id="31" title="Drop-down Choice 1" isPermitted="true" typeId="1         " path="null" class='menuItem'  onclick="ShowMenu(SelectorContainer4);Do('31')" /><noBr>Drop-down Choice 1</noBr></div>


(Edit changes: It should be a difference between the values for "isPermitted" in the code above and not "onclick" as I first wrote)
Reply


Messages In This Thread
How to distinguish objects via other properties than shown via Object Spy? - by MGMN - 09-16-2008, 09:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Collecting Objects And Object State At Runtime zunebuggy 3 1,547 11-22-2017, 02:37 PM
Last Post: supputuri
  object spy not recognizing object.. pleaseeeee help Sonia Sadeque 3 3,200 12-22-2016, 02:42 PM
Last Post: ishan.mahajan@adp.com
  Row count is always shown as 1 Harry1999 0 1,979 04-14-2016, 11:11 PM
Last Post: Harry1999
  verify that parent properties match object currently displayed in your application. sona 0 2,957 02-21-2016, 12:00 PM
Last Post: sona
  Object Spy window is not getting hidden Neetha 2 2,802 08-28-2015, 01:27 PM
Last Post: balak89

Forum Jump:


Users browsing this thread: 1 Guest(s)