Hi there,
Could you please help me to correct my script below? I don’t know to use list and how to access list value. I’m very appreciated.
==================================
ComonShare.script
function FindCurrentScreenAndPressButton inputbutton, screenlookingfor
put inputbutton into selectedbutton
put screenlookingfor into currentscreen
if ["ComonShare" findImage:currentscreen] is true then
["ComonShare" PressSelectedButton: selectedbutton]
Wait 2.0
else
set errormsg = "Unable to find" & selectedbutton
LogError errormsg
return false
end if
end FindCurrentScreenAndPressButton
=======================
ExeTestCase.script
function testcase1
put ((image1,screen1), (image2,screen2), (image3,screen3), (image4,screen4) into testcase1image
put Failed into testcasefailed.
put Passed into testcasepassed.
repeat with each item of testcase1image
if ["ComonShare" FindCurrentScreenAndPressButton: testcase1image] is not false then
["ComonShare" FindCurrentScreenAndPressButton: testcase1image]
else
set errormsg = "Testcase1 is failed at" & second value, screen from the list testcase1image.
LogError errormsg
return testcasefailed & errormsg.
exit function
end if
end repeat
return testcasepassed
end testcase1