Sign in to follow this  
Followers 0
anilmanyam

Problem to click link on the next page

6 posts in this topic

I am a newbie and trying to do a simple task to automate navigation through a website

When i open the url with the _IEcreate function a new window opens and i am able to click any link on it

Once the control navigates to the next page i am not able to click on any link

Here's my script

#include <IE.au3>

$URL= "http://www.rediff.com"

$IE = _IECreate ("http://www.rediff.com")

WinActivate("[CLASS:IEFrame]","")

WinSetState("[CLASS:IEFrame]", "", @SW_MAXIMIZE)

_IELoadWait($IE)

$string1 = "News"

_IELinkClickByText($IE,$string1)

;Control navigates to the next page now

string2 = "More New Stories"

_IELinkClickByText($IE,$st2) ; Not working

;I guess $IE still points to "http://www.rediff.com"

;What do i need to do to make $IE point to the current page now so that i can click a link on it

Share this post


Link to post
Share on other sites



anilmanyam,

I am a newbie

Obviously so as you have posted your question in a section clearly marked as "Example scripts - This is not a general support forum!". :)

But welcome to the AutoIt forum anyway - I have asked for your thread to be moved to the correct section. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Probably because there is no $st2 variable.

that was a typing mistake while posting.... :)

it is _IELinkClickByText($IE,$string2)

So wats wrong....

I am not getting any error... and the last couple of lines execute but to no effect

Share this post


Link to post
Share on other sites

Are you running this in SciTe with F5? If not, do so and look at thte messages in the console at the bottom. You say you rea not getting an error, but you are not checking the return status of _IELinkClickByText, so you would not know unless you can see the console.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Are you running this in SciTe with F5? If not, do so and look at thte messages in the console at the bottom. You say you rea not getting an error, but you are not checking the return status of _IELinkClickByText, so you would not know unless you can see the console.

Dale

Dale

there's a warning which says "Warning from function _IELinkClickByText, $_IEStatus_NoMatch"

I am having a hard time understanding what's wrong with the script and why i am not able to click on any link after i navigate successfully to the next page..

I would appreciate your help very much.

Thanks in advance

Anil

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