Semirxbih
12 months agoContributor
Object detected locally but comes back as "Object not found" in Jenkins
Hey all,
So I have an issue where an list object is not detectable inside Jenkins but it passes just fine in my local environment and I am not sure why that might be happening.
So I have this code:
try {
var dialogDownload = Aliases.browser.FindChildEx(
["ObjectType", "Caption"],
["Dialog", "Downloads"],
10,
true,
20000
);
if (dialogDownload.Exists) {
Log.Message("Dialog found successfully.");
Sys.HighlightObject(dialogDownload);
} else {
Log.Warning("Dialog not found.");
}
} catch (e) {
Log.Error("An error occurred: " + e.message);
}
This finds the appropriate object, which is this in the object window:
Now, I'm trying to drill in and find the "List" object, which has this code:
try {
var intermediateObject = dialogDownload.FindChild("ObjectType", "Pane", 20);
var list = intermediateObject.FindChildEx(
["ObjectType", "Caption"],
["List", "Recent downloads"],
20,
true,
20000
);
if (list.Exists) {
Log.Message("List found successfully.");
Sys.HighlightObject(list);
} else {
Log.Warning("List not found.");
}
} catch (e) {
Log.Error("An error occurred while trying to find the list: " + e.message);
}
It is located in the following object window:
Locally, it finds the object just fine, but when I run it in Jenkins, it says "Object not found" on the List. Is there another approach that I might be able to take?