Sign in to follow this  
Followers 0
jefhal

Press a java link in IE

3 posts in this topic

#1 ·  Posted (edited)

If you go to this website on the Dell support network: https://support.dell.com/support/supportrequests/create.aspx

There is a "Submit" button there. Right now the only way I can find to press that link is to use the brute force mouseclick(300,400) method. Unfortunately, if the page changes in the least or I'm on another machine, the mouseclick misses the spot. Can anyone tell me how to press a link whose hyperlink looks like this:

java script:window.document.formSupportRequestEnterTag.submit();

Here's what I'm doing now:

#include <IET2.0.6.au3>
Global $fname, $lname, $username, $ext, $dnary
Opt("WinTitleMatchMode", 2)
Opt("TrayIconDebug", 1) 
$localservtag = "8M4D611" ; real service tag number of dead machine needed for test to work
Sleep(2000)
$servtag = InputBox("Enter your service tag:","Please enter service tag:",$localservtag)
$o_IE = _iecreate()
WinWait("Blank Page - Windows Internet Explorer")
Sleep(1000)
WinSetState("Blank Page - Windows Internet Explorer","",@SW_MAXIMIZE)
Sleep(1000)
ToolTip("loading first support page")
_ienavigate($o_IE,"https://support.dell.com/support/supportrequests/create.aspx",1)
_ieloadwait($o_IE)
Sleep(5000)
$o_form = _IEFormGetObjByName($o_IE, 'formSupportRequestEnterTag')
Sleep(1000)
ToolTip("entering service tag")
$o_servtag = _IEFormElementGetObjByName($o_form, "ServiceTag")
Sleep(1000)
_IEFormElementSetValue($o_servtag, $servtag)
$realsize = WinGetPos("Dell - Support - Windows Internet Explorer")
MouseClick("Left",$realsize[0]+419,$realsize[1]+568) 
sleep(1000)
ToolTip("loading second support page")
_ieloadwait($o_IE)

Thanks!

Edited by jefhal

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Easy, click the image before the Text link :)

$oIE = _IECreate ("https://support.dell.com/support/supportrequests/create.aspx")
_IEImgClick ($oIE, "https://img.dell.com/images/global/brand/ui/primary.gif")
Edited by retghy

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Easy, click the image before the Text link :)

$oIE = _IECreate ("https://support.dell.com/support/supportrequests/create.aspx")
_IEImgClick ($oIE, "https://img.dell.com/images/global/brand/ui/primary.gif")
What can I say? Awesomely Awesome! Thanks to you and DaleHohm for your efforts! Edited by jefhal

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0