I have 10 libraries in my folder(SUT machine). These library names are placed in to one .csv file .in our machine
Now I am taking the libraries one by one (Here I am taking each and every library is one variable like temp1)
- If library (abc) is found it should click the text and continue the script on SUT machine
- If second library(bcd- attached .csv file) is not found it should check the screen,then it should go and pick the third library and continue the script.
My requirement is if library name is not found in the SUT machine, it should go and take the third library name and continue the script.Should not stop any where .
Set filePath="Filepath\libraryFramework.csv" Log "File path is =", filePath (*Read the library name from library .csv file*) if file filePath exists then Repeat with lineno= EACH LINE OF File filePath (* A library is found with execution flag true *) if item 2 of lineno ="YES" then put item 1 of lineno into textToBeFound Log "Library name to be found =", textToBeFound put textToBeFound into temp1 ImportingLibary --This function is for select libraries folder (*Select the library name from .csv file*) Put ReadText ("TLImage","BRImage") into TextFound -- read text within the SearchRectangle (no need to specify SearchRectangle as a parameter for ReadText when it is the only parameter). replace every occurrence of return in TextFound with comma -- replace the return characters with commas Log TextFound -- log the results if Imagefound (Text:temp1 ,SearchRectangle: ("TLImage","BRImage"),ignorespaces:true) Click foundImageLocation () else Repeat while not ImageFound (Text:temp1,SearchRectangle: ("TLImage","BRImage"),ignorespaces:on) if Imagefound (Text:temp1 ,SearchRectangle: ("TLImage","BRImage"),ignorespaces:on) else if imagefound ("BottomScroll") LogError "Library-" && temp1 && "is not available" Exit Repeat else if Imagefound ("Scrollbar") DoubleClick "Scrollbar" moveto MouseLocation()+(15,0) else end if end if end Repeat Click foundImageLocation () end if else end if end Repeat end if