Js 'MalformedURLException: no protocol' error when clicking js link
-------------------------------------------------------------------

         Key: WT-523
         URL: http://webtest-community.canoo.com/jira/browse/WT-523
     Project: WebTest
        Type: Bug

    Versions: 3.0    
 Environment: FF3 and IE6, XP
    Reporter: Rhee K Kgopolo
 Attachments: JsErrorMalformedUrl.txt

When attempting to click the link below with:

<clickElement XPath ="//*...@title='Pick a Job Function']"
                                                        description="Verify 
Client Job function lookup " /> OR
<clickElement XPath ="//*...@href='javascript:void(0)']"
Also tried to create the url w/ regExp. I can click the link manually w/ out 
error.

MalformedURL error is generated and Webtest does not advance to the next 
expected pop window. The expected window is a search page that populated the 
original page. I have attached the log with more details. I'm not sure if there 
is a result of htmlunit (2.4) or webtest.

Snippet:
                <tr class="cHeight25">
                        <td id="requiredLabel">Job Function:</td>
                        <td>
                                <input type="hidden" name="txtJobCodeID" 
value="0">             
                                
                                        <input type="Text" size="20" 
maxlength="50" name="txtJobCodeDescription" id="txtJobCodeDescription" value="" 
readonly="true">
                                        <a href="javascript:void(0)" 
onClick="javascript:ShowWizard('JOBCD', txtJobCodeID, 
txtJobCodeDescription)"><img border="0" height="16" src="/images/dropdown.gif" 
title="Pick a Job Function" width="16"></a>
                                
                        </td>
                </tr> 

Error:
[[clickElement]  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[clickElement] Caused by: java.net.MalformedURLException: no protocol: 
/PSLookup/PSLookup.cfm?pLookupId=JOBCD&p01=76
[clickElement]  at java.net.URL.<init>(URL.java:567)
[clickElement]  at java.net.URL.<init>(URL.java:464)
[clickElement]  at java.net.URL.<init>(URL.java:413)
[clickElement]  at 
com.gargoylesoftware.htmlunit.javascript.host.Window.jsxFunction_showModalDialog(Window.java:1094)
[clickElement]  ... 93 more
[clickElement] Inside wrapped exception:
[clickElement] java.net.MalformedURLException: no protocol: 
/PSLookup/PSLookup.cfm?pLookupId=JOBCD&p01=76
[clickElement]  at java.net.URL.<init>(URL.java:567)
[clickElement]  at java.net.URL.<init>(URL.java:464)
[clickElement]  at java.net.URL.<init>(URL.java:413)
[clickElement]  at 
com.gargoylesoftware.htmlunit.javascript.host.Window.jsxFunction_showModalDialog(Window.java:1094)
[clickElement]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[clickElement]  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[clickElement]  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[clickElement]  at java.lang.reflect.Method.invoke(Method.java:597)
[clickElement]  at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
[clickElement]  at 
org.mozilla.javascript.FunctionObject.call(FunctionObject.java:476)
[clickElement]  at 
org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3330)
[clickElement]  at 
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487)
[clickElement]  at 
org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
[clickElement]  at 
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
[clickElement]  at 
com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to