NCL Community Forum Index
  Home   Login   Register   Help   Memberlist   Search   NCL  

NCL Community Forum Index » Freeware » WAP-Unit - Automate WAP site testing.
Post new topic  Reply to topic View previous topic :: View next topic 
WAP-Unit - Automate WAP site testing.
PostPosted: Thu Aug 19, 2004 7:14 pm Reply with quote
Administrator
Site Admin
Joined: 11 Aug 2004
Posts: 237




WAP-Unit Testing Software - automatically test your WAP software and services

WAP-Unit is similar to the HTTP-Unit from Sourceforge in that it does for WAP-sites what HTTP-Unit does for Websites

WAP-UNit is a Java library that is used to create tests that automatically browse WAP sites to check for behaviour and responses.

WAP-Unit is free. It maybe open-sourced in the near future.

WAP-Unit operates over the HTTP bearer.

Download WAP Unit 0.9.4 here
(Previous Version Download WAP-Unit 0.9.0b)


Example
Below is a a simple coded test that goes to google, enters a keyword, clicks on a response and checks the response contains certain text.

Code:

    public void testGoogleProvato()
            throws WapUnitException
    {
        //load initial url
        //Phone phone = new Phone("http://wap.google.com/wml");
        WmlBrowser phone = new WmlBrowser("http://wap.google.com/wml");


        //find an input named 'q' and set it's value
        Input responseInput = phone.getTextInput("q");
        responseInput.setValue("Provato");

        //find an anchor in the card and click it
        Anchor searchLink =
           phone.getCurrentCard().getAnchorWithText("Search");
        searchLink.click();

        Anchor vfie =
           phone.getCurrentCard().getAnchorWithText("NCL Technologies");
        vfie.click();

        //check that the card returned has some text visible
        phone.assertVisisbleTextContains(
           "Card does not contain required text", "Provato");
    }



This works for the WML page(s)

Code:

<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="Google"><do type="prev"><prev/></do>
<do type="accept" label="Search">
<go href="http://www.google.com/wml?q=$(q)&amp;start=0&amp;hl=en"/>
</do><p align="center">Entire Web<br/>
<input emptyok="true" name="q"/><a href="http://www.google.com/wml?q=$(q)&amp;start=0&amp;hl=en">Search</a><br/>
<a href="/wml?page=2&amp;hl=en">Search Options</a></p>
</card>
</wml>



Last edited by Administrator on Thu Aug 26, 2004 11:10 am; edited 1 time in total

_________________
Best regards,
The NCL forum team
http://www.ncl.ie
View user's profile Send private message

Does WAP-Unit support XHTML?
PostPosted: Tue Aug 24, 2004 7:05 am Reply with quote
Administrator
Site Admin
Joined: 11 Aug 2004
Posts: 237




Does WAP-Unit support XHTML?

No, WAP-Unit does not support XHTML.

XHTML would be covered by the HTTPUnit project on sourceforge - which parses XML as well as HTML.

More on XHTML in relation to WAP: Nokia XHTML FAQ

_________________
Best regards,
The NCL forum team
http://www.ncl.ie
View user's profile Send private message

I get an IncompatibleClassChangeError
PostPosted: Thu Aug 26, 2004 11:07 am Reply with quote
Administrator
Site Admin
Joined: 11 Aug 2004
Posts: 237




Phone class has been replaced with WmlBrowser in new version of WAP-Unit.

Also, classes have been moved into ie.ncl.wapstack.wml.*;

Update your code should fix problem.

Download WAP Unit 0.9.4

_________________
Best regards,
The NCL forum team
http://www.ncl.ie
View user's profile Send private message

Java -how-to run wapunit0.9.4.jar ?
PostPosted: Wed Oct 27, 2004 11:06 am Reply with quote
vkjaersgaard
Joined: 27 Oct 2004
Posts: 1




Dear Sirs,

- thank you for making this software available for free use and download!
- I am,however, not experienced using any java software at all. Therefore, I am lost when I try to launch the application (both in XP and using my normal SuSE9.1/Linux machine).

I do:

java -jar wapunit0.9.4.jar

and I get:

wml_tester/wapunit0.9.4> java -jar wapunit0.9.4.jar
Failed to load Main-Class manifest attribute from
wapunit0.9.4.jar
vk@SuSEPRIV91:~/Documents/downloads/wml_tester/wapunit0.9.4>

What am I (not) doing or doing wrong here?

Thank you for your patience and understanding!

Best regards
Verner Kjærsgaard
Denmark
View user's profile Send private message Send e-mail

WAP-Unit - Automate WAP site testing.
 NCL Community Forum Index » Freeware
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Post new topic  Reply to topic