| || |
Need help in QTP scrript
How to recognize an object uniquely if it acts as an edit box as well as combo box.
I want to use it both ways in my script.First i want to se a value into it and then later i have to select the same value from dropdown.
object.Set("abc") doesnt works.
At run time somehow QTP doesnt recognize the object as Edit box.
Hope this info might help u.
1>I have added the object/control in OR as Edit box
2>Another as Combo
3>I am able to highlight it from the application
4>Already used Object Spy,it shows as Edit box if u point the cursor at text box and shows as combo if u point the cursor at dropdown menu.
Re: Need help in QTP scrript
Is it related to Network Login window? If yes try with below code.
<font class="small">Code:</font><hr /><pre>
Set oDialog = Description.Create 'Descriptine Creation for Dialog
oDialog("nativeclass").Value = "#32770" 'Set the mandatory property values
oDialog("text").Value = "Connect*.*"
oDialog("regexpwndclass").Value = "#32770"
Set oUserName = Description.Create ' Description Creation for UserName
oUserName("naticeclass").Value = "ComboBox" 'Set the Mandatory Property Values.
oUserName("attached text").Value = "&User name:"
oUserName("regexpwndclass").Value = "ComboBox"
Set oPassword = Description.Create ' Description Creation for Password
oPassword("nativeclass").Value = "Edit" 'Set the Mandatory Values
oPassword("attached text").Value = "&Password:"
Set oOk = Description.Create
oOk("nativeclass").Value = "Button"
oOk("text").Value = "OK"