I need to get a URL from a webpage, but since it’s not simple HTML, I’m not sure how to extract the information. Right now I’m using a Get Text activity and it’s getting the anchor using CV (computer vision). It’s also using CV to scrape the text, but it’s making mistakes with zeros and ohs, 5 and S, things like that. UI Explorer can’t find exactly what I’m looking for since it’s in an IFrame.
If I’m on the webpage and click Inspect on the text/URL I need, I see this:
Thanks @ashokkarale , can you help me a little more?
I used a Get Attribute activity. I selected the target as the part of the page that will have the URL. I set the Attribute to “class=”“ok”“” (using two double-quotes around ok to escape them), and Saved to my DownloadLink variable.
During runtime, I get this error: Get Attribute ‘msedge.exe Q2’: Attribute not supported by the current UiNode.
Thank you for helping me!
I’m updating the UiPath.uiautomation.activities to 23.10 now, but I doubt that’s the issue. This is just over my level of development. The webpage isn’t simple HTML, it’s built in the vendors package and seems to be in an IFrame. UIexplorer can’t find the text/element. I’m not sure how to find the selectors/elements/children.
If I right-click and view frame source, I see the HTML and the URL I need to get:
<div class="details">
<p class="ok">
Report has been attached to Salesforce Case xxxxx
</p>
<!--<p class="ok"><a href="https://customer.yyyyy.com/servlet/servlet.FileDownload?file=012345g6HHRR1" target="_blank">Direct link to download: https://customer.yyyy.com/servlet/servlet.FileDownload?file=012345g6HHRR1</a></p>-->
<p class="ok">
Direct link to download:
<br/>
https://customer.yyyy.com/servlet/servlet.FileDownload?file=012345g6HHRR1
</p>
</div>
I just don’t know what activities to use to get the URL after the Direct link to download. Once I have a whole string, I can figure out how to parse it and just get the URL.
@postwick , when I target the element in the Get Text activity, I get a message “Could not detect any text elements using native scraping.” It automatically switches to CV.
Sounds like it’s not able to identify it as an “A” tag. You’ll have to just Get Text on its parent element (tag=‘P’ class=‘ok’) and then use RegEx to get the URL out of the resulting text.