Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a way to select dynamic option of an object in run time?
#1
Solved: 11 Years, 4 Months ago
Hi everyone,

I am a new person using QTP to develop test script. I am writing the test script to verify adding some products with different options to a cart of web application. I wonder how to identify dynamic options of these products in run time. I used datatable with the column "ProductID" which is described as inputted parameter. It means that I only input the static Product ID from the datatable to "Search" field of web page and I want to execute the script to automatically select an option item in each group from the specified Product ID (not to select a specified option as below and I also don't want to input static options into datatable) then add it to the cart. Please help me find a way to solve it.

Here are some recorded scripts when using the Record functionality:

Code:
Browser("IE").Page("Shopping site").WebEdit("keywords").Set DataTable("ProductID", dtGlobalSheet)
Browser("IE").Page("Shopping site").Image("find our site").Click 8,5
Browser("IE").Page("Product").WebEdit("qty").Set "3"

'it means that I select the option item 1 from option group 1 "id[MGP915]"
Browser("IE").Page("Product").WebList("id[MGP915]").Select "Amber Color"
'it means that I select the option item 2 from option group 2 "id[MGP899]"
Browser("IE").Page("Product").WebRadioGroup("id[MGP899]").Select "OPT3522"
Browser("IE").Page("Product").Image("In Cart").Click 91,12
Browser("IE").Page("Product").Sync
Browser("IE").Close
'end script.

Many thanks to quick reply for this case.
BR


Messages In This Thread
Is there a way to select dynamic option of an object in run time? - by joshasha - 10-16-2009, 09:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  swfwindow object name getting changed after each run saniya 1 1,686 10-10-2018, 09:02 PM
Last Post: TheGlovner
  Object Name Is Also A Dynamic Value zunebuggy 0 1,147 05-16-2017, 09:53 PM
Last Post: zunebuggy
  Object identification is taking too much time JACKSPARROW 0 1,701 01-17-2017, 11:08 AM
Last Post: JACKSPARROW
  QTP not recogonising object during run time Lavanya N 2 3,727 10-28-2015, 12:46 PM
Last Post: vinod123
  Writing to Run time data table Neetha 5 12,174 08-27-2015, 10:18 AM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 11 Guest(s)