Hi,
I am having a drop down box in my frontend, whose value I need to change.
I have successfully added the drop down box to my repository but I am unable to figure out how to change the value.
I am using the below code
Code:
Browser("Time File").Page("Time File: Alexander Adams_3").Frame("contentFrame").SAMEdit.SetProperty Text,"Year"
But I get the following error :
Invalid procedure call or argument
Line (95): "Browser("Time File").Page("Time File: Alexander Adams_3").Frame("contentFrame").SAPEdit.SetProperty Text,"Year""
I guess I am not setting the property correctly .
Can someone suggest me how to do it
I have attached a snapshot of the drop down box whose value I wish to change.
Thanks ,
A Beginner
Hi Rookie,
I could not under stand why you are using "SAMEdit.SetProperty Text,"Year""?
Any how you can select the 'Year' from list box by just using :"Select" method on the list box.
Let me know if you need any info.
Thanks,
QTPKing.
Hi ,
Thanks for your input. I tried using "Select" method on the object SAMEdit.
The codeline was "SAMEdit. Select("Year")
However, I get an error which states that
The method is not defined on this object.
Even in intellisense on SAMEdit object, I donot get to see the Select method.I get SetProperty and that is the reason why I used that method.
Kindly advise.
Rookie
Hi,
Please try Weblist("SAMEdit").Select "YEAR". It may be help you, I guess..
Thanks,
Code:
Browser("Time File").Page("Time File: Alexander Adams_3").Frame("contentFrame").Weblist("SAMEdit").Select "Year"
We 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?
Something which has me perplexed,
The code states SAMEdit, The error message states SAPEdit?
typo?
Would be helpful if you can paste the code?
Wondering if the list is the issue, then you can try to remove the list object from the repository, highlight it in the application and make sure it does highlight. Rename the object, and code that line for the list.
Else,
Try the descriptive approach. Just for the list spy the properties and put them across and see if the select works.
This is just a trial, there could be numerous reasons why this isint working. Could be the application layer, technolgical issues, select in itself could have a issue..magnitude just grows !!
Well..God did not invent QTP
so never mind, try the above and lets see if we can plough far enough.