Find methods with array's of properties and values doesn't work
I saw in the documentation that you can pass along multiple properties in some of the Find methods. I have now tried to implement this twice and I still can't get it to work.
I'm trying to find an 'a' element so I can click on it. First I make sure the menu with the link visible is opened. Then I declare the array's and then I try to find the object. You can see my code here:
page.formWelkom.textnode.textnodeBasisgegevens.imageIconMenuPng.Click();
let PropArray = new Array("href", "VisibleOnScreen");
let ValuesArray = new Array("/Lis/Schuttingen.aspx", true);
let obj = page.Find(PropArray, ValuesArray, 100);
obj.Click();
In the screenshot you can clearly see the link visible on the screen.
Can anyone please help me with this?
I've used the Object Spy tool to find the following object.
And the coding works using pathname as opposed to href
function Test() { var PropArray = new Array("pathname", "VisibleOnScreen"); var ValuesArray = new Array("/223/BulkAnnuity", true); var item = Aliases.panelDashboard.Find(PropArray, ValuesArray); if (item.Exists) { Sys.HighlightObject(item); } else { Log.Error("Item not found"); } }