Grabbing an OnClick value

Advanced programming using WinTask scripting language

Grabbing an OnClick value

Postby dlmoseman on Wed Jul 02, 2014 6:19 pm

I'm working with a website that has a huge account list that I'd like to be able to clean up programmatically. The interface looks like this:

Screen Shot 2014-07-02 at 1.07.41 PM.png
(15.59 KB) Downloaded 963 times

I need to find the user codes saved in a spreadsheet and click the [Edit] link associated with it. When I Spy on the web page it will let me capture either the user code or the [Edit} link, but not the enter row.

So I looked at the source code which looks like this:

Screen Shot 2014-07-02 at 12.50.31 PM.png
(13.75 KB) Downloaded 982 times

I think I could use CaptureHTML with the <li> tag, but I'm not sure what the syntax would look like. Do I use INNERTEXT to find the user code? How does the on click value get returned?
Posts: 1
Joined: Fri Jun 20, 2014 2:28 pm

Re: Grabbing an OnClick value

Postby TechSupport on Thu Jul 03, 2014 8:48 am


I don't see in the code if there is a link behind each li name. If there is one, you can use ExtractLink WinTask function for extracting all the links and then you can use Navigate function to navigate to each url.
If there is no link behind each item in the list, then you need to capture the whole page using GetPageSource$ and then do some parsing with SplitIntoArray and ExtractBetween$ for extracting the information you want.

WinTask Tech Support
Posts: 805
Joined: Thu Nov 16, 2006 9:58 am

Return to Scripts programming

Who is online

Users browsing this forum: No registered users and 2 guests