Micro Focus QTP (UFT) Forums
Drop Down menu loses value - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Drop Down menu loses value (/Thread-Drop-Down-menu-loses-value)



Drop Down menu loses value - ATestani - 01-28-2014

We recently updated to IE10. We were using IE8 as our browser. In 8 our scripts ran without issues. We are running UFT 11.52 with the latest patches.

In one application I have a drop down menu that selects a state from a list of 4. UFT will select the state but as it moves to the next step the state field returns to the original default value, causing an error in the application and preventing the script from continuing. Listed below is the coding for the 3 steps of this simple action.

Code:
"Browser("Homeowners").Page("Homeowners").WebEdit("Effective Date").Set DataTable("EffectiveDate", dtLocalSheet)
Browser("Homeowners").Page("Homeowners").WebList("State").Select DataTable("State", dtLocalSheet)
Browser("Homeowners").Page("Homeowners").Link("Next >> Bottom").Click"



RE: Drop Down menu loses value - jacosta - 01-28-2014

Hi, you can try this:

Code:
Set WshShell=CreateObject("WScript.Shell")

"Browser("Homeowners").Page("Homeowners").WebEdit("Effective Date").Set DataTable("EffectiveDate", dtLocalSheet)


Browser("Homeowners").Page("Homeowners").WebList("State").activate

WshShell.SendKeys ("{DOWN}")

Browser("Homeowners").Page("Homeowners").WebList("State").Select DataTable("State", dtLocalSheet)



RE: Drop Down menu loses value - ATestani - 01-28-2014

I changed ".activate" to ".Click". This has solved my problem. Thanks for the help.