Jump to content
Sign in to follow this  
saikumar

Capturing text in a browser

Recommended Posts

Hi,

I want to find a string after an operation.

I am sending the urls to the browser from my ui and launching the action of "GO" button in IE.

after the page is loaded i want to check some contents.

I dont want to use Inet classes because i should store the page. I am simulating for 50 users so its difficult.

I cant use Autoitx classes for http request . Ther i should send one more request to the server .

can any one suggest me to read text on the current browser window without storing it in a file.

Regards

Sai

Share this post


Link to post
Share on other sites

Hi,

       I want to find a string after an operation.

can any one suggest me to read text on the current browser window without storing it in  a file.

<{POST_SNAPBACK}>

This controls the browser using the object model. It requires 3.1.1++ from the developer forum.

$url = "http://www.amazon.com"

; Create IE Object
$ObjIE=ObjCreate("InternetExplorer.Application")

; Set IE visible, navigate to URL and wait for load complete
With $ObjIE
  .Visible = True
  .Navigate($url)
  Do; Idle until load complete
    Sleep(50)
  Until .ReadyState = 4
EndWith

; These variables collect everything inside the BODY tag
$theText = $ObjIE.document.body.innerText; gets just text
$theHTML = $ObjIE.document.body.innerHTML; gets everything including HTML
Edited by DaleHohm

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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...