[twin] r24 committed - Edited wiki page 5minTutorial through web user interface.

0 views
Skip to first unread message

tw...@googlecode.com

unread,
Apr 19, 2011, 8:52:29 AM4/19/11
to twin-c...@googlegroups.com
Revision: 24
Author: francois.reynaud
Date: Tue Apr 19 05:51:39 2011
Log: Edited wiki page 5minTutorial through web user interface.
http://code.google.com/p/twin/source/detail?r=24

Modified:
/wiki/5minTutorial.wiki

=======================================
--- /wiki/5minTutorial.wiki Tue Apr 19 02:58:51 2011
+++ /wiki/5minTutorial.wiki Tue Apr 19 05:51:39 2011
@@ -1,13 +1,55 @@
-#summary One-sentence summary of this page.
-
-= Introduction =
-
-TODO
-
-
-= Details =
-
-Add your content here. Format your content with:
- * Text in *bold* or _italic_
- * Headings, paragraphs, and lists
- * Automatic links to other wiki pages
+#summary Getting started with TWIN in 5 min.
+#labels twin,tutorial,howto,java
+
+
+
+= Setting up the server =
+
+Download TWIN remote control, unzip on the machine when your AUT is
installed..
+
+If you're using windows 7, you may have to unblock the files first. Right
click on each file, properties. In the general tab, click the Unblock
button at the bottom.
+
+Check that the server is running : http://yourmachineIP:4444/ ( use the
machine IP rather than localhost to be able to use the IDE ).
+If the server is running properly, you should see :
+
+[http://twin.googlecode.com/svn/wiki/images/status.png]
+
+(Twin only recognizes notepad because that's the only application
configured by default.
+To add more application, update sharpclaws.xml, and add your application
name and the path where it's installed.)
+
+
+= Writing the first test =
+
+Now that the server is running, you can now create your first test. The
only langage completed to pilot the TWIN server is java. .NET is coming
soon.
+
+Download twin-client-standalone-1.0.jar
+Start a new java project and add the jar to the project classpath.
+Create a new class with a main ( updatin the URL you pass as a parameter
to the application to match the IP of the machine where sharpclaws.exe has
been launched ):
+
+{{{
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+import org.ebayopensource.twin.Application;
+import org.ebayopensource.twin.TwinException;
+import org.ebayopensource.twin.element.Window;
+
+
+public class Demo {
+
+
+ public static void main(String[] args) throws TwinException, IOException {
+ Application app = new Application(new
URL("http://192.168.39.185:4444")); // URL of the remote control
+ app.open("notepad", null); // launch app configured as 'notepad' on
remote control, any version
+ Window window = app.getWindow();
+ window.type("Hello world!");
+ window.getScreenshot().save(new File("screenshot.png"));
+ app.close();
+ }
+
+}
+}}}
+
+Launch it.
+You should see notepad starting, and a screenshot will be created in the
root folder of you project.

Reply all
Reply to author
Forward
0 new messages