Geeks With Blogs

News QTP and Stuff
Theo Moore Questions... Morphology? Longevity? Incept dates? May 2006 Entries
QTP: Option not so explicit
Just an interesting note, but the Option Explicit switch in QTP doesn't apparently *always* work. I can routinely find cases where the switch isn't honoured. Not only is the value not there (i.e., a null variable), but the code in question *should* through an error thanks to the null value (like Div by Zero), but it doesn't....grrrrr......these sort of things drive me *nuts*!!!! Also, I might not be posting as much in the next few weeks. I am working to get up to speed on the setlist for Jaded, the ......

Posted On Tuesday, May 30, 2006 7:12 AM

QTP: Custom Controls, cont'd.
Good news! Turns out the sliders are merely jscript there for show; they alter the value of some hidden fields in the frame where the sliders are located. Since there is no validation involved with the sliders themselves, I can access the fields via XMLDOM and change the values. Once changed, just submit like always. Sweet! Join me at: ......

Posted On Thursday, May 18, 2006 2:52 AM

QTP: Custom Controls
I was asked recently to automate some new functionality provided to our clients via a custom web interface, and have run into 2 major snags. The custom interface contains custom controls, and quite literally, QTP can't recognize them. It won't even recognize them to the point of saying "I don't know what this is". I am going to see if I can resolve this, but unless the devs are willing to change it some (and I know they are not) we won't be able to automate this application. Darn it. I'll keep at ......

Posted On Wednesday, May 17, 2006 4:22 AM

QTP: Regular expressions and Descriptive Programming
I am using some of the code I listed earlier in my blog to open and get the hwnd of some browser/page objects. However, one of the other automation engineers found an issue with my code. Apparently, the code had trouble opening a url like http://groups.google.com/gr... So, I began to work on it. QTP was returning the ever-useful “General Error“ error, so I had to sleuth this out for myself. I am using this construct in my code to get at the handle: If Browser(“hwnd:=“ & ......

Posted On Wednesday, May 10, 2006 2:40 PM

SC Code Camp registration still open!
Never been to a code camp? You should go! Lots of code, all day.... Find details here: I am still working on my two sessions, but find the time has been tough. Also, I am trying to figure out how to use my crummy laptop to show the NETCF game session. The trouble is that the emulator for PDA in VS2005 is *very* slow to load. I've considered selling a kidney to buy a new one, but so far Sheri is saying no...something about me needing mine ......

Posted On Tuesday, May 9, 2006 2:05 PM

QTP: Browser and page handles; a better solution
Partha, a gentleman who posted on my blog, left some suggestions that ultimately made getting the page and browser hwnd much easier. I made some slight changes to his code to do what I wanted, and here's our result: Public Function OpenBrowser(byval URL,ByRef strBrowser, ByRef strPage) Dim oIE 'As InternetExplorer.Application Dim WaitCount 'As Long Set oIE = CreateObject("InternetExplo... oIE.visible = 1 oIE.Navigate2 URL WaitCount = 0 Do While oIE.ReadyState <> 4 And WaitCount ......

Posted On Thursday, May 4, 2006 2:53 PM

QTP: Early vs. Late Bound objects in DLL
I am working on a DLL that I can call that will open an instance of Internet Explorer, and then return its Browser handle and Page handle. I am trying to write procedures that will handle functionality totally independent of the text in the title, the text on the page, or whatever else QTP uses to reference these objects. Basically, I am frustrated having to fix regular expressions or whatever to make sure my references work. It seems like a no-brainer to me that I should be able to open a browser, ......

Posted On Monday, May 1, 2006 1:04 PM

Copyright © Theo Moore | Powered by: GeeksWithBlogs.net | Join free