I’m developing a somewhat complex bot for my work section. This next hurdle of mine is trying to toggle a check box that isn’t exactly next to the variable text it needs to find and select. AssetID is the variable, the position on the page may change with every transaction processed. See screen shot below.
I get the “Anchor Base: Text was not found” error.
I’ve tried Find Element, and that gives me an error about the scope, selector, and something else isn’t working. I’m at standstill with this project. Any advice or direction is greatly appreciated.
You should pick the number element, it should retrieve and attribute called aaname or innerText, you should create a dynamic element passing your variable based on one of the previous attributes
BTW: in the left side you should use a find element activity, pick the asset id and create the dynamic selector. In the right side use a click activity or check activity
line 1 is your window / parent selector
line 2 refers to the anchor, in this case the TD with text ‘Mytext2’
line 3 provides the hierarchy relation between the 2 elements
line 4 the actual checkbox, with a non specific selector.
Replace ‘MyText2’ with ‘{{YourVariable}}’ and it is dynamic.
Should be possible using the same method. The hierarchy in the table might differ somewhat, resulting in different values for your "<nav up='x' />" value and the selected controls might have different tags but that should be all.
Note the * in the anchor selector to use as a wildcard for your Rpt level prefix.
Using the view source (in your browser) of your target web should give you some insight of the table’s structure (if it even is a table).
Nonetheless sometimes you get weird sites with wierd constructions where even anchoring is difficult.
A more sluggish method would be looping through the options, validating the table rows one by one untill you get a match. Then use the same tablerow identifier to click the link. But that would be a really desparate method. I recommend playing with the anchor method first.