QTP not identfying combo box
I have a combo box in my application.
1. I type in the text which i want to select from the list
2. To select that i have to click the mouse on the items which came for the substring i typed so it is finally selected.
3. Then click on submit on the page.
Step 2 is not getting captured on the QTP due to which it throws an error as nothing has been selected in the list.
Try the below code for Step 2
value = "your value"
try to set
Setting.WebPackage("ReplayType") = 2 before click and reset after that.
Other Solutions Technology Tree: QTP - Unable to select Weblist in QTP if help you
Use venugqtp code but try by toggling the ReplayType or as one other next option is using shell object, sendkeys method if former doesnt work.
This throws an error saying that "Cannot us parenthesis while using a sub". Can you please give a definitive step.
I'm not sure what the line of code looks like that you are writing about. What this message is saying is that you can either remove the parentheis around the parameters or put the word Call in front of the line of code. For example if you have
MealTime("Lunch", "Time") ' this would give the error you mentioned.
Change it to:
MealTime "Lunch", "Time"
Call MealTime("Lunch", "Time")
its a text box, if u type any value in that text box, respective value listed in the drop down list. Am i correct ? you got error for this scenario means reply me. i will give the code.
i faced problem for this type of scenario and tried. its working fine.
yes your right its the same issue and instead of value getting selected from the list value gets set and which my application is not able to identify it while recording from QTP , can u please give me a solution to this.
I'm having a bit of trouble understanding your last question.
On the .Set "apple",
is the value apple in the drop down list?
Browser("B").Page("P").webedit("Textbox").Set "abc" 'To Give value in the textbox
Browser("B").Page("P").webedit("Textbox").Type " " 'Empty the value
Set objpage = Browser("B").Page("P")
Set WshShell = CreateObject("Wscript.Shell")
Set WshShell = Nothing
Last edited by indiranis; 04-11-2013 at 08:40 PM.