Hello,
I have an anchor base activity which click to element according to its anchor.
How can I check if element, i am clicking on is exists?
(anchor base doesnt allow if activity inside it).
Thanks
Hi There @Slavich
May I Know which version of studio you are using…
Now in UiExplorer itself you can indicate an anchor and check of element exists or on element appear. No need of anchor base activity if you want to check for element exists.
Regards
@Raghavendraprasad
I am using 2019.7.0
I dont think It would work without anchor base, cause the final element doesnt have clear selector.
- Indicate your desired element either in element exists or on element appear -
- Open UiExplorer through the ‘edit selector’ option
- There are two option ‘Indicate element’ and ‘indicate anchor’
- Indicate the element first and then indicate the anchor and stabalise the selectors using static values and other element attributes.
- Save and test it
Hope this helps
Thank you @Raghavendraprasad for your help. There is still smth I dont understand.
I provide you with screenshots to understand my situation.
Here is workflow:
I am using anchor base to click a link under “Translation” , it is “PBI 3004…”.
This link as you see lower has no selectors.
And here are 2 scenarios: if link exists or not, with its selectors on the right side.
/////
How can I make a check if this link “PBI 0304…” exists or not? If exists - click on it.
Hi there,
Seems like you might have to go through a series of conditions to check for all your scenarios (In the screenshot alone I seem to notice 2 cases)
- Original and translation exists
- Original exists but translation doesn’t
Have you checked whether you are getting any selectors by changing modes in UiExplorer? There is accessibility and UiAutomation mode for you to explore and see whether they yield any attributes.
Also, you can check for ‘href’ attribute if the page source having the original and translated documents are housed under (Also check out find children activity Search results for 'find children user:raghavendraprasad' - UiPath Community Forum )
Check these and get back if the problem persists (if it is not confidential I can take a looka t the link and give some solutions if possible)
Regards
@Slavich I just want to say as my experience whenever we use anchor base it’s fully based on anchor how we Indicated that element and for click activity there is no chance of changing selectors because it won’t allow you to change the selector when you’re in anchor base,so my suggestion rather than going with anchor base first check by using find element to find the respective element you’re looking for if it finds then go for anchor base.
I’ve solved it by using GetAttribute with innerText.
Thank you guys.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.