Contributions
Re: Get body of a web page with Iexplore
here is how i test my code : 1) I open iexplore 2) Manually open http://www.google.fr 3) Once page is loaded i run my script : Sub Find_Str_Body Dim url, browser, page, body, str url = "http://www.google.fr" strBrowser = "iexplore" str = "Recherche" Set browser = Sys.Process(strBrowser) Set page = browser.Page(url) If LCase(browser.ProcessName) = "iexplore" Then Set body = page.Application.Document.body if(aqObject.CheckProperty(body, "innerText", cmpContains, str, False) ) then Log.Message("Texte trouve") else Log.Message("Texte non trouve") end if Else ' Firefox & Chrome Set body = page.contentDocument.body if( aqObject.CheckProperty(body, "textContent", cmpContains, str, False) ) then Log.Message("Texte trouve") else Log.Message("Texte non trouve") end if End If End Sub 4) i haver the error : Unable to find the object Page(http://www.google.fr). See Additional Information for details. 12:11:04 Normal on line Set page = browser.Page(url)1.5KViews0likes0CommentsRe: Get body of a web page with Iexplore
Hello, Thank's a lot for your reply. Do you know if it's possible to get the source code of an page already loaded (a page that is loaded after a click action) ? I try to explain myself : Instead of usingSet page = browser.ToURL(url) Is it possible to use something like Set page = browser.Page(url) I know this one doesn't work... Thank's again1.5KViews0likes0CommentsGet body of a web page with Iexplore
Hello, I'm using Test Complete 8 and tring to get body of a web page by scripting. I tried to use : Sub Test Dim url, browser, body, str url = "http://www.google.fr" Set browser = Sys.Process("iexplore").ToURL(url) Set body = browser.contentDocument.body Log.Message(body.textContent) End Sub If i use firefox instead of iexplore it works fine but if i'im usig IE8 i have this error : Unable to find the object contentDocument. See Additional Information for details.14:03:28Normal Anyone can explain me why ?19KViews0likes6CommentsTC can't find my object in objetc browser
I'm recording a Keyword test, after i stop recording, i right click on an object an click on "Show in object Browser". Tc can't find the object => it does not exist. Everything was working fine before. I have a pink cicrcle auround the icon of my web page. Can't find what it means.... You can see it in attached picture Does anyone have an idea ?27KViews0likes3Comments- 1.3KViews0likes0Comments