https://www.learnqtp.com/forums/Thread-N...p-down-box
Code:
'Updated by test maintenance run
'Updated by test maintenance run
' "Delete Assessment" is one of several selection choices in the dripdown Box. It does not register when you click to execute, QTP stops, Using the Maintenance option just made it worse. In this script we are selecting to delete three records created using the dropdown option , with "delete" confirmation, and returning to View All Tasks to select next record.
'
Browser("Home - Protection Database_2").Page("Home - Protection Database_3").WebElement("Delete Assessment").Click
'Browser("Home - Protection Database_2").Page("Home - Protection Database_3").WbfGrid("ctl00_ctl13_g_3dbb10b0_eb3b_425a_8e1c_37b4a58c9ca6_ctl00_ctl00_GridViewTasks_gridView_ctl02_ctl00_t").ClickCell
'Browser("Home - Protection Database_2").Page("Home - Protection Database_3").WbfGrid("ctl00_ctl13_g_3dbb10b0_eb3b_425a_8e1c_37b4a58c9ca6_ctl00_ctl00_GridViewTasks_gridView_ctl02_ctl00_t").ClickCell
Browser("Home - Protection Database_2").Page("Home - Protection Database_4").WebButton("Delete").Click
Browser("Home - Protection Database_2").Page("Home - Protection Database_4").WebButton("Close").Click
Browser("Home - Protection Database_2").Page("Home - Protection Database_5").Link("View All Tasks").Click
Browser("Home - Protection Database_2").Page("Home - Protection Database_3").WebElement("Delete Assessment").Click
Browser("Home - Protection Database_2").Page("Home - Protection Database_4").WebButton("Delete").Click
Browser("Home - Protection Database_2").Page("Home - Protection Database_4").WebButton("Close").Click
Browser("Home - Protection Database_2").Page("Home - Protection Database_5").Link("View All Tasks").Click
Browser("Home - Protection Database_2").Page("Home - Protection Database_3").WebElement("Delete Assessment").Click
Browser("Home - Protection Database_2").Page("Home - Protection Database_4").WebButton("Delete").Click
Browser("Home - Protection Database_2").Page("Home - Protection Database_4").WebButton("Close").Click
Browser("Home - Protection Database_2").Page("Home - Protection Database_5").Link("View All Tasks").Click
'
'Wait(3)
Browser("Home - Protection Database_2").Page("Home - Protection Database_3").Link("Home").Click
'
Wait(3)
Browser("Home - Protection Database_2").Page("Home - Protection Database_2").Link("View All Tasks").Click
Wait(3)
Browser("Home - Protection Database_2").Page("Home - Protection Database_3").Link("My Tasks").Click
Wait(3)
Browser("Home - Protection Database_2").Page("Home - Protection Database_3").Link("View All Tasks").Click
Wait(3)