Re: HTML parsing--need to be able to click on parsed elements
Re: HTML parsing--need to be able to click on parsed elements
- Subject: Re: HTML parsing--need to be able to click on parsed elements
- From: Deivy Petrescu <email@hidden>
- Date: Sat, 11 Jun 2016 10:25:47 -0400
> On Jun 9, 2016, at 23:39 , William Dockery <email@hidden> wrote:
>
> Ed and Deivy,
>
> Thanks for your responses! Both of them moved me significantly forward in my understanding of i) how to parse text using text item delimiters and ii) how to build a list of HTML elements using JavaScript. So I have already learned a lot from you.
>
> However, what I failed to clarify to you and to myself is that I need more than text, or dates. I actually want to CLICK on the first element that matches:
>
> <A href="#"onclick=“refreshSession
>
> This text pattern signifies an HTML element that, when clicked, will download a specific type of document, which is my general objective. Clicking on the first of these elements will download the most recent document, which is my specific objective.
>
> And I can’t just search for <A and click on the first <A element, because there are several other irrelevant <A elements higher up in the source of the page.
>
> Thanks for any additional help—
>
> William
>
>
William,
if this is the case, and since I don’t know the page, I’d suggest the following, you already have the first script of the 2 I suggested.
You want to get a text which is actually a date in the form : dd/dd/dddd where “d” stands for digit and “/“ stands for /
Use script 1 and regular expression to detect the link you want, then send a click() to that link.
Deivy Petrescu
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden