Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not able to set value from a drop-down box
#1
Solved: 10 Years, 8 Months, 4 Weeks ago Exclamation 
resubmitted as seperate thread:
SadWe have a simular problem. We are using the record options as we build our automated scripts, and recording the response from the drop-down entries. However, when runing the automated script, it will stop at the Drop-down. If I am using the Run in maintenance mode, I can select the drop-down and then it will accept the entry, and complete the block, and stop at the next drop-down. Once I have done this for the entire repository object. it looks identical to what was originally in the Script. Unfortunately, when I again run the Script with the new changed script it does exactly the same thing stoping at the drop-down stating it can not proceed. It would appear that the Drop-down structure is not recoginzed. In one case I actually used the Set statement to enter the data into the space rather than using the drop-doen, but even this has had limited success since it can not wotk when a drop-down includes s second level dropdown selection. Any Idea how I can get around this problem?
Code:
'
Browser("Browser").Page("Page_3").WebButton("New Initiative").Click
Browser("Browser").Page("Home - Initiative Tracking_2").WebEdit("ctl00$ctl13$UserControlHost1$c").Set "King0004"
'It stops at each of the next steps
Browser("Browser").Page("Home - Initiative Tracking_2").WebEdit("ctl00$ctl13$UserControlHost1$ctl00$txtSubject").Set "Test Tracking System"
Browser("Browser").Page("Home - Initiative Tracking_2").WebList("ctl00$ctl13$UserControlHost1$c").Select "Transition"
Browser("Browser").Page("Home - Initiative Tracking_2").WebEdit("ctl00$ctl13$UserControlHost1$ctl00$txtVendor").Set "SSB"
Browser("Browser").Page("Home - Initiative Tracking_2").WebList("ctl00$ctl13$UserControlHost1$ctl00$ddlLeadTenet").Select "Mitigate"
Browser("Browser").Page("Home - Initiative Tracking_2").WebList("ctl00$ctl13$UserControlHost1$ctl00$ddlInitiativeStage").Select "Unassigned"
Browser("Browser").Page("Home - Initiative Tracking_2").WebEdit("ctl00$ctl13$UserControlHost1$ctl00$txtSeniorPoints").Set "Test Master"
Browser("Browser").Page("Home - Initiative Tracking_2").WebEdit("ctl00$ctl13$UserControlHost1$c_2").Set "Test Procedure"
Browser("Browser").Page("Home - Initiative Tracking_2").WebList("ctl00$ctl13$UserControlHost1$ctl00$ddlSeniorPointsClass").Select "U//FOUO"
Browser("Browser").Page("Home - Initiative Tracking_2").WebEdit("ctl00$ctl13$UserControlHost1$ctl00$txtLongDescription").Set "Long Description of test for Tracking System"
'Updated by test maintenance run


Error received ....
The "ctl00$ctl13$UserControlHost1$ctl00$txtSubject" WebEdit object was not found in the Object Repository.
Check the Object Repository to confirm that the object exists or to find the correct name for the object.

Line (4):
Code:
"Browser("Browser").Page("Home - Initiative Tracking_2").WebEdit("ctl00$ctl13$UserControlHost1$ctl00$txtSubject").Set "Test Tracking System"".

Tip: If the objects in your application have changed, the Maintenance Run Mode can help you identify and update your steps and/or the objects in your repository. This code was created in the Maintenance Run. Sad
Reply
#2
Solved: 10 Years, 8 Months, 4 Weeks ago
This is an issue of dynamic object properties. First check which properties are dynamic and then either make those as regex or pass object properties at run time.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 10 Years, 8 Months, 4 Weeks ago
Sad Sorry, I didn't understand a word you said, "dynamic object properties", "make those as regex or pass object properties at run time" what does this mean to a novice?
I have created an Object repository for each screen, I just use recording mode to go throught the test manually, but when I run the automated script, it does not work. I have manage some minor success by rearanging the data entries to complete the form by rows rather than columns. But when I click Creat at the bottom of the screen rather than staying in the same browser windo it opens another Window, and My system gives me access denied but recognizes who I am.
Why is it opening is a seperate window, when I recorded the process it did not do that?
Reply
#4
Solved: 10 Years, 8 Months, 4 Weeks ago
(02-11-2011, 07:15 PM)EldonKing Wrote: Sad Sorry, I didn't understand a word you said, "dynamic object properties", "make those as regex or pass object properties at run time" what does this mean to a novice?

Lets say you record upon an object and one of the properties value gets recorded as "xyz" in Obj Rep. Now whenever you run upon that object you see that object property keeps on changing. (can be checked using spy) Such properties are known as dynamic properties and should be handled using regex OR by passing properties at run time OR may be by removing them altogether from the object repository - as per the need of test.

I guess, it would take us a lot of post exchanges before we can tell you the specific code for your case. I would suggest taking help/training in your organization for quicker response.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to set value in application web edit box tanuj dewangan 4 3,466 07-29-2016, 03:58 PM
Last Post: harshadevadas
  Drag and drop issue excellentpawan123 0 2,595 01-13-2015, 05:04 PM
Last Post: excellentpawan123
  Drop down list class is a link thotamurali 2 3,962 08-22-2014, 05:48 PM
Last Post: thotamurali
  Selecting values from drop down using QTP. prempujaripati 2 46,361 06-26-2014, 06:06 PM
Last Post: rasmirani
  issue in drag and drop excellentpawan123 0 2,201 05-15-2014, 04:36 PM
Last Post: excellentpawan123

Forum Jump:


Users browsing this thread: 1 Guest(s)