Find Child Method -Doing 2 different Things
In the code below = I am able to click on the object Consistently however when Ito write it to the log it "errors" on the else statement as if the object does not exist.
It seems like I am doing the same thing twice and getting a different result.
def CheckRequestPersonEnhanced():
myChRequest = ' '
PropArray = ["ObjectType","contentText"]
ValuesArray = ["Link","Browse Check Request - Person"];
#Log.Message(ValuesArray)
browser = Aliases.browser
page = browser.Page("*")
page.FindChild(PropArray, ValuesArray,10).click()
myChRequest = page.FindChild(PropArray, ValuesArray,10)
if (myChRequest.exists):
Log.Message("Success Check Detail")
else:
Log.Message("Processing Exemptions")
sPath = "C:\\Users\\Schofem\\Logs\\BadChecks.txt"
# Creates a text file at the specified location
aqFile.Create(sPath)
# Opens the created file for writing
myFile = aqFile.OpenTextFile(sPath, aqFile.faWrite, aqFile.ctUnicode)
# Writes text to the file
myFile.WriteLine(aqDateTime.Now())
# myFile.WriteLine(DDT.CurrentDriver.Value[0])
# myFile.WriteLine(DDT.CurrentDriver.Value[26])
# myFile.WriteLine(DDT.CurrentDriver.Value[27])