Hi Marc,
I somehow debugged my code and was trying to came up with minimal test-case, I found that there is some problem in getting the attribute node in canoo.
for example, lets say there is a radio button in my page and it has a attribute my:label as defined below
Now I try to get it like this using dom :-
if(radioButton.getAttributeNode("my:label")){
labelText = radioButton.getAttribute("my:label");
}
Canoo browser doesn't return any value of labelText. And thats why my test is failing. Has anybody used it before? I tried it in IE and firefox, it works well.
Thanks,
-Ruchika
Message: 5
Date: Tue, 07 Oct 2008 15:44:55 +0200
From: Marc Guillemot <[EMAIL PROTECTED]>
To: webtest@lists.canoo.com
Subject: Re: [Webtest] debugger in canoo webtest
Reply-To: webtest@lists.canoo.com
Reply-To: Marc Guillemot <[EMAIL PROTECTED]>
Hi,
it seems that the line
var formHold = Dom.getElementsByClassName("formHold",'td',newElement)[0];
return undefined in WebTest which is a bug if it works correctly in your
"normal" browsers.
Can you provide a minimal test case where WebTest behavior is not correct?
Cheers,
Marc.
--
Web: http://www.efficient-webtesting.com
Blog: http://mguillem.wordpress.com
Ruchika Badjatia wrote:
> Hi,
> In my code I am trying to manipulate the DOM. Removing the original
> radio button from the DOM and readding it in the TD element of the table.
>
> Lines of code :-
>
> var newElement = radioButton.parentNode.insertBefore(btn,radioButton);
> var oldElement = radioButton.parentNode.removeChild(radioButton);
> var formHold = Dom.getElementsByClassName("formHold",'td',newElement)[0];
> var newRadioBtn = formHold.appendChild(oldElement);// line throwing
> exception
>
> Here is the descrption of the error which I am getting :-
>
> Java-Script error loading page http://localhost:8888/myapp: Wrapped
> com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot call
> method "appendChild" of undefined
> (http://localhost:8888/myapp/scripts/common/screen.js#327)
> (http://localhost:8888/myapp/scripts/common/core.js#290)
>
>
> -Ruchika _______________________________________________ WebTest mailing
> list WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest
- [Webtest] Problem with getAttributeNode Ruchika Badjatia
- Re: [Webtest] Problem with getAttributeNode Marc Guillemot
- Re: [Webtest] Problem with getAttributeNode Ruchika Badjatia
- Re: [Webtest] Problem with getAttributeNode Ahmed Ashour