in reply to web automation button clicking problems

I see from your question on Stackoverflow that the id changes each time, so to find the id of the search link you could use HTML::TreeBuilder::XPath
use HTML::TreeBuilder::XPath; # ... my $tree = HTML::TreeBuilder::XPath->new_from_content($content); my $id = $tree->findvalue('//a[@title="SEARCH"]/@id');
I'm not familiar with Win32::IEAutomation but the "button" you need to click on is actually a link so change getButton() to:
$ie->getLink('id:', $id )->Click();
That may not work as it is a javascript function - onclick="dispatch()" - if it doesn't you will need to examine the javascript to see where the link is going to and what parameters it has, then you could probably use LWP::UserAgent to access.

Replies are listed 'Best First'.
Re^2: web automation button clicking problems
by MicrobicTiger (Initiate) on Jan 31, 2014 at 03:34 UTC

    Thanks Tangent.

    I'm afraid I still get the same error. It seems to be the

     click()

    That it takes exception to.

      Can you find the javascript function "dispatch()" and post it here - it will either be on the page somewhere or in an external javascript file linked from the page.

        Sure

        function dispatch(id, cmd) { setFieldValue("internal.wdk.wdkCommand", id); if (cmd) { setFieldValue("internal.wdk.wdkCommandArgument", cmd); } document.getElementsByTagName('form')[0].submit(); }