Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use Datatable values for automating Weblist in a web page
#3
Solved: 11 Years, 4 Months ago
Hi kkishore12345,

Try with the following procedure:

First of All, Store all required test data in Datatable(Global or Local Sheet) & then In File Menu --> Settings --> Run Tab --> Choose "Run On only One Iteration" Option) :

Code:
rc=Datatable.GetSheet("Global").GetRowCount
For i=1 to rc  ' Start of Main Loop
Datatable.GetSheet("Global").SetCurrentRow(i)
Browser("browser").Page("Page1").link("Create New Account").Click
Browser("browser").Page("Page2").link("Continue").click

Expected_DOB=trim(Datatable("DateOfBirth",dtglobalSheet))
Browser("browser").Page("Page3").Weblist("Date Of Birth").Select Expected_DOB


Expected_country=trim(Datatable("countries",dtglobalSheet))
country_Count=Browser("browser").Page("Page3").Weblist("Country").GetROProperty("Items Count")
For j=1 to country_Count
    Actual_country=trim(Browser("browser").Page("Page3").Weblist("Country").GetItem(j))
             if (Expected_country=Actual_country) then
                 Browser("browser").Page("Page3").Weblist("Country").Select j
                 Exit for
             end if
Next

Expected_Language=trim(Datatable("IELangPref",dtglobalSheet))
Languages_Count=Browser("browser").Page("Page3").Weblist("Languages").GetROProperty("Items Count")
For k=1 to Languages_Count
    Actual_Language=trim(Browser("browser").Page("Page3").Weblist("Languages").GetItem(k))
             if (Expected_Language=Actual_Language) then
                 Browser("browser").Page("Page3").Weblist("Languages").Select k
                 Exit for
             end if
Next
Browser("browser").Page("Page3").link("Continue").click
Browser("browser").Page("Page4").link("Master Account").click

' Navigate Back to Page1

Next    ' End of Main Loop
Reply


Messages In This Thread
RE: How to use Datatable values for automating Weblist in a web page - by sreekanth chilam - 01-01-2009, 12:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  WEBLIST shayk1985 3 5,618 05-17-2018, 11:49 AM
Last Post: Ankur
  click each web link in a page using Index or other method in QTP smeijer 13 24,723 04-29-2017, 04:53 PM
Last Post: kowshik
  Automating SAP Sales Order Dwarak Calayampundi 0 1,718 06-09-2016, 09:28 AM
Last Post: Dwarak Calayampundi
  VB Script to count number of links in a web page. Suma Parimal 4 25,281 07-01-2015, 12:59 PM
Last Post: govind
  Weblist selection diya 11 21,376 06-16-2015, 08:27 PM
Last Post: rajpradeep32

Forum Jump:


Users browsing this thread: 1 Guest(s)