Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem selecting in a dropdown menu during playback.
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
I have a problem selecting a value for a dropdown menu during playback. I'm getting the error: "Object is disabled". During playback, the dropdown menu responds to a Click with the code:
Code:
Browser( "Browser" ).Page( "Page" ).WebEdit("default value:=ABC").Click
But, can't select a value with the code:
Code:
Browser( "Browser" ).Page( "Page" ).WebEdit("default value:=ABC").Set "XYZ"
Listed below are the object's properties. Anyone know how to correct this problem? Thanks!

Code:
Class Name = WebEdit
abs_x = -358
abs_y = 577
class = rcbInput
default value = Full iLearnNYC Class
disabled = 0
height = 18
html id = ctl00_ctl00_cpMainBody_childCPMainBody_radCourseDeliveryType_Input
html tag = INPUT
innerhtml =     
innertext =     
kind = singleline
max length = 2147483647
name = ctl00$ctl00$cpMainBody$childCPMainBody$radCourseDeliveryType
outerhtml = <INPUT style="DISPLAY: block"
id=ctl00_ctl00_cpMainBody_childCPMainBody_radCourseDeliveryType_Input class=rcbInput
title="Please select term" value="Full iLearnNYC Class" readOnly type=text
name=ctl00$ctl00$cpMainBody$childCPMainBody$radCourseDeliveryType
autocomplete="off" jQuery152023392217578324192="3">
outertext =     
readonly = 1
rows = 0
type = text
value = Full iLearnNYC Class
visible = TRUE
width = 143
width in characters = 20
x = 690
y = 233
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Is it WebEdit or Menu?
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Try this,
Code:
Browser( "Browser" ).Page( "Page" ).WebEdit("html id := ctl00_ctl00_cpMainBody_childCPMainBody_radCourseDeliveryType_Input
").Set "XYZ"
Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
It's a drop down menu, which records and Object Spy sees as WebEdit. Thanks.
Reply
#5
Solved: 11 Years, 4 Months, 3 Weeks ago
I tried using the html id, but still get the error "Object is disabled". Thanks.
Reply
#6
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi...
Object Spy clearly shows that the object is readonly. So, you will get 'Object is disabled' error.

If u want to change the readonly property to editable field, you can use below code.

Code:
Browser("Browser").Page("Page").WebEdit("WebEdit").Object.readOnly=false
'it makes it editable field
Code:
Browser("Browser").Page("Page").WebEdit("WebEdit").Set "vins"
' now you can set the value u want

Can u attach the screen shot of the page if it does not work?
Reply
#7
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Friends,
I am also getting same problem in my application. QTP is setting value in the Edit box. But could not able to select correct option from drop down. It meas drop down list is not displaying while doing with QTP. If we are trying manually then list is getting displayed.

Here is the properties for WebEdit object
Code:
"Class Name:=WebEdit",
"abs_x:=431",
"abs_y:=316",
"class:=ui-autocomplete-input autocomplete-found",
"default value:=",
"disabled:=0",
"height:=26",
"html id:=org_picker_kw",
"html tag:=INPUT",
"innerhtml:=",
"innertext:=",
"kind:=singleline",
"max length:=2147483647",
"name:=org_picker_kw",
"outerhtml:=<INPUT aria-haspopup=true style=""WIDTH: 320px; FLOAT: left"" id=org_picker_kw class=""ui-autocomplete-input autocomplete-found"" role=textbox value=""Alliance Community Fund"" type=text name=org_picker_kw autocomplete=""off"" aria-autocomplete=""list"" madeSelection=""true"" open=""true"" jQuery162087509997674758=""5"">",
"outertext:=",
"readonly:=0",
"rows:=0",
"type:=text",
"value:=",
"visible:=True",
"width:=330",
"width in characters:=20",
"x:=431",
"y:=146"

I have attached screen shot of my application. Can you please share your thoughts


Attached Files Image(s)
   
Reply
#8
Solved: 11 Years, 4 Months, 3 Weeks ago
It works like a charm. Thanks!
Reply
#9
Solved: 11 Years, 4 Months, 3 Weeks ago
Can you provide me the script, how did you resolve this?
Reply
#10
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi qemls29,
I'm facing same issue, How did you got it working?

In my application, I've WebEdit object called 'time_zone'
Manually: If I type India, I get it in the drop down(already highlighed), Then press ENTER.

I'm unable to do same thing in UFT. Any suggestion would help.
I tried SendKeys and FireEvent but didn't work.

-Sharan
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Sad How To Find Dropdown Object based on Values from the dropdown list mesg2anil 12 34,278 12-19-2017, 10:25 PM
Last Post: sandy2404
  how to select value from google search box dropdown +QTP prajyot 0 2,924 06-28-2017, 06:30 PM
Last Post: prajyot
  Searching for and selecting row in Datawindow zsl0009 0 2,839 08-04-2015, 01:02 AM
Last Post: zsl0009
  Selecting Link Magad 1 2,853 11-07-2014, 03:56 AM
Last Post: PrateepKaraval
  How to select a city from the dropdown yash 3 5,216 10-28-2014, 12:13 AM
Last Post: rameshrise3

Forum Jump:


Users browsing this thread: 1 Guest(s)