Support Requests item #1849169, was opened at 2007-12-12 08:51
Message generated for change (Comment added) made by henryju
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497983&aid=1849169&group_id=61302

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: atop85 (atop85)
>Assigned to: Julien HENRY (henryju)
Summary: Can't find a link - although its there

Initial Comment:
Hello everybody,

I have a problem with testing a website. I just wanted to  assure that links 
are there and I can click on them - but it fails. For information I'm using 
JWebUnit 1.4.1.
Here is the code:

<table>
..
<TABLE width="100%"  border="0" cellpadding="0" cellspacing="0">
<TR>
  <TD class="navigation1Aktiv">
       TextOne</TD>
</TR>
<TR>
  <TD class="navigation2Aktiv">
       TextTwo</TD>
</TR>
<TR>
<TD class="navigation2" id="unav1"                          
 onMouseOver="P7_swapClass(1,'unav1','navigation2Over',
  'navigation2Over','td')"  
 onMouseOut="P7_swapClass(1,'unav1','navigation2',
  'navigation2','td')" 
 onClick="window.location.href='dispatch.do;
  jsessionid=******************:-1
  ?ref=****_***&amp;rai=0&amp;bt_TXN=do'">
 <NOSCRIPT>
  <A href="dispatch.do;
jsessionid=*******************:-1?ref=1500_****&amp;+
rai=0&amp;bt_TXN=do" class="nav2" 
onfocus="if(this.blur)this.blur()">LinkName</A>
</NOSCRIPT>
<script language="JavaScript"> document.write("<a 
class='nav2'>LinkName</a>")</script></TD>
    </TR>
----------------------------------------------------

And here is the JWebUnit-Code:

package ******;


import net.sourceforge.jwebunit.junit.WebTestCase;
import org.junit.After;
import org.junit.Before;


public class CheckContentMainPage extends WebTestCase{

        public CheckContentMainPage(String name){
                super(name);
        }
        
        public void main(String[] args){
                junit.textui.TestRunner.run(CheckContentMainPage.class);
        }
        
        @Before
        public void setUp() throws Exception{ 
                super.setUp();
                getTestContext().setBaseUrl("http://*****/****/";);
        }

        @After
        public void tearDown() throws Exception {
        }

public void testKreditkartenOnlineLinks(){                      
setScriptingEnabled(true);
        beginAt("/");
        assertFormPresent("***");
        setWorkingForm("****");
        assertSubmitButtonPresent("logon");
        submit("logon");
        gotoWindow(1); // everything works until this point
        assertLinkPresentWithText("LinkName");
        // Now I'll get an AssertionFailedError
}
}

----------------------------------------------------
I hope you can help me, because I've tried some things but nothing worked. 
Don't know what to do now. ;)

Bye Atop85




----------------------------------------------------------------------

>Comment By: Julien HENRY (henryju)
Date: 2007-12-12 09:05

Message:
Logged In: YES 
user_id=1235926
Originator: NO

Hi,

Could you please use getPageSource() to display HTML source just after
submit("logon");

++

Julien

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497983&aid=1849169&group_id=61302

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to