I'm running a script on a java app. Sometimes this app will throw up warning message regarding hostname mismatch, with option if clicking yes or no. I want to put this warning in an if, then statement (if exist, then click yes), but I'm having some trouble with QTP running my script.
At this point in the code, I always get a TYPE MISMATCH error.
<font class="small">Code:</font><hr /><pre>set od_JaveWin_Warn = Description.Create
I've also tried using Class Name, but it generates the same error.
I've searched high and low for an answer to this problem, but so far I'm coming up empty handed.
The Option Explicit directive has nothing to do with QTP and therefore DP. It is a fundamental vbScript. I strongly recommend using this without fail in every lib and QTP script you write. Had this been done you would have easily spotted this problem.
I had a lenghty question all typed in regarding an Object not in OR error ...
<font class="small">Code:</font><hr /><pre>If JavaWindow("od_JavaWin_Warn").JavaDialog("od_JavaD iag_Warn").JavaButton("od_JavaButton_Warn").Exist Then</pre><hr />
I was about to hit submit, when something hit me.
(<font color="red">"</font>Java().Java()...<font color="red">"</font>)
That's two error 40s in one day. Fortunately i learned something from them.
Big thank you to everyone who contributed [img]/images/graemlins/smile.gif[/img]