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:
Object when active and clickable:
(Edit changes: It should be a difference between the values for "isPermitted" in the code above and not "onclick" as I first wrote)
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)