vbscript - Dynamic Link in UFT automation? -
i want write dynamic vbscript web automation in uft 12.02. pass dynamic value part of link. here sample line code:
set objexcel = createobject("excel.application") objexcel.workbooks.open "f:\automation\web\business\webtestdata.xls" curr= 1 20 usd = objexcel.sheets(1).cells(curr,1).value if browser("...").page("...").exist browser("...").page("...").webelement("webelement").click 'attempt click on drop down link browser("...").page("...").link("usd").click end if next
"usd"
keep changing, i.e. picking excel.
expected result:
generate script attempt click on different links below:
browser("...").page("...").link("euro").click browser("...").page("...").link("bp").click browser("...").page("...").link("aed").click browser("...").page("...").link("ksh").click browser("...").page("...").link("ir").click
i have 0 experience uft, shouldn't using variable usd
instead of string "usd"
want?
for curr= 1 20 usd = objexcel.sheets(1).cells(curr,1).value if browser("...").page("...").exist browser("...").page("...").webelement("webelement").click 'attempt click on drop down link browser("...").page("...").link(usd).click end if next
Comments
Post a Comment