Micro Focus QTP (UFT) Forums
Unable to select an item from weblist and unable to enter text in edit box - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Unable to select an item from weblist and unable to enter text in edit box (/Thread-Unable-to-select-an-item-from-weblist-and-unable-to-enter-text-in-edit-box)



Unable to select an item from weblist and unable to enter text in edit box - estherindu - 11-03-2009

Hi Folks,

IN my application,I have written script to select an item from a web list and then enter text in an edit box.but while running the script it is performing both the operations.

here is my code:
Code:
With BrowserObject
.WebList("micclass:=WebList","name:=lstTitle","index:=0").select "Broken Link"
.WebEdit("micclass:=WebEdit","html id:=txtFeedback","index:=0","html tag:=TEXTAREA").Set "Feedback given on "&strDate
.Webbutton("micclass:=WebButton","name:=Send").click
end With

Please revert me with your suggestions.
Please find the correction with in stars.

Hi Folks,

IN my application,I have written script to select an item from a web list and then enter text in an edit box.but while running the script it is *not* performing both the operations.

here is my code:
Code:
With BrowserObject
.WebList("micclass:=WebList","name:=lstTitle","index:=0").select "Broken Link"
.WebEdit("micclass:=WebEdit","html id:=txtFeedback","index:=0","html tag:=TEXTAREA").Set "Feedback given on "&strDate
.Webbutton("micclass:=WebButton","name:=Send").click
end With

Please revert me with your suggestions.


RE: Unable to select an item from weblist and unable to enter text in edit box - Saket - 11-03-2009

is there any error you are receiving, which statement QTP does not perform?


RE: Unable to select an item from weblist and unable to enter text in edit box - estherindu - 11-03-2009

Surprisingly it is not throwing any error.
In Result window it is ahowing as QTP performed all the steps.

The weblist and webedit steps are not performed.
The list box select type is ComboBox Select


RE: Unable to select an item from weblist and unable to enter text in edit box - estherindu - 11-04-2009

Please sshre me your ideas on how to resolve the issue.

Please respond ASAP.

Thanks in Advance


RE: Unable to select an item from weblist and unable to enter text in edit box - basanth27 - 11-04-2009

See if this helps you,

Code:
Settings.Webpackage("ReplayType") = 2

With BrowserObject
.WebList("micclass:=WebList","name:=lstTitle","index:=0").Click
.WebList("micclass:=WebList","name:=lstTitle","index:=0").select "Broken Link"
.WebEdit("micclass:=WebEdit","html id:=txtFeedback","index:=0","html tag:=TEXTAREA").Set "Feedback given on "&strDate
.Webbutton("micclass:=WebButton","name:=Send").click
end With

Settings.Webpackage("ReplayType") = 1

Code:
Settings.Webpackage("ReplayType") = 2

With BrowserObject
.WebList("micclass:=WebList","name:=lstTitle","index:=0").Click
.WebList("micclass:=WebList","name:=lstTitle","index:=0").select "Broken Link"
.WebEdit("micclass:=WebEdit","html id:=txtFeedback","index:=0","html tag:=TEXTAREA").Set "Feedback given on "&strDate
.Webbutton("micclass:=WebButton","name:=Send").click
end With

Settings.Webpackage("ReplayType") = 1

Sorry, had issues wrapping. I hope now it should be clear.


RE: Unable to select an item from weblist and unable to enter text in edit box - viswa - 05-15-2012

Hi Saket,

I am unable to select any item from weblist which recorded in QTP10. I didn't do any changes but ran same script as recorded. when I highlight the object, the weblist object getting hightlighted. Can you please guide me how to select an Item from weblist.

Error mesage:

Cannot identify the object "JRNL_HDR_IU_VW_JRNL_HDR_STATUS" (of class WebList). Verify that this object's properties match an object currently displayed in your application.

Line (39): "Browser("Oracle | PeopleSoft Enterprise").Page("Create Journal Entries").Frame("TargetContent").WebList("JRNL_HDR_IU_VW_JRNL_HDR_STATUS").Select " "".

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.
Regards
-Viswa