Permalink
Browse files

Removes the project demo and points to joint project with RF

Use project from https://bitbucket.org/robotframework/webdemo
because it has better documentation and usage possibilities.
  • Loading branch information...
1 parent 652410d commit e6e180dc8e4f73727bfbab0c09d3824c54b7d6a9 @aaltat aaltat committed Aug 22, 2016
View
@@ -3,14 +3,8 @@ include *.txt
include *.rst
exclude */*.txt # limit previous command to include only *.txt files in root folder
exclude */*.rst # limit previous command to include only *.rst files in root folder
-include selenium.bmp
-recursive-include demo *.txt *.rst *.py *.sh *.bat *.html *.css *.js
-prune demo/reports
-prune demo/selenium_log.txt
-prune demo/output.xml
-
-include doc/Selenium2Library.html
+include docs/Selenium2Library.html
recursive-include src *.py
graft src/Selenium2Library/resources
View
@@ -107,19 +107,6 @@ certain projects, you can use them instead of source distributions.
Just download 32bit or 64bit installer depending on your system,
double-click it, and follow the instructions.
-Directory Layout
-----------------
-
-demo/
- A simple demonstration, with an application running on localhost
-
-doc/
- Keyword documentation
-
-src/
- Python source code
-
-
Usage
-----
@@ -128,17 +115,12 @@ Selenium2Library must be imported into your Robot test suite.
See `Robot Framework User Guide`_ for more information.
-Running the Demo
-----------------
-
-The demo directory contains an easily executable demo for Robot Framework
-using Selenium2Library. To run the demo, run::
-
- python demo/rundemo.py
-
-E.g.::
+Demo project
+------------
+A demo project illustrating how to use this library can be found from:
+https://bitbucket.org/robotframework/webdemo
- python demo/rundemo.py demo/login_tests
+Please see the usage instructions from the demo project pages.
Getting Help
------------
@@ -1,21 +0,0 @@
-/* Simple styles for demo
- *
- * Setting text-align is a workaround for IE. See for example
- * http://bluerobot.com/web/css/center1.html
- */
-
-body {
- font-family: sans-serif;
- color: black;
- background: #DDDDDD;
- text-align: center;
-}
-#container {
- width: 30em;
- height: 15em;
- margin: 5em auto;
- background: white;
- border: 1px solid gray;
- padding: 10px 30px;
- text-align: left;
-}
@@ -1,12 +0,0 @@
-<html>
-<head>
- <title>Error Page</title>
- <link href="demo.css" media="all" rel="Stylesheet" type="text/css" />
-</head>
-<body>
- <div id='container'>
- <h1>Error Page</h1>
- <p>Login failed. Invalid user name and/or password.</p>
- </div>
-</body>
-</html>
@@ -1,40 +0,0 @@
-<html>
-<head>
- <title>Login Page</title>
- <link href="demo.css" media="all" rel="stylesheet" type="text/css" />
- <script type="text/javascript">
- function login() {
- if (document.login_form.username_field.value == 'demo' &&
- document.login_form.password_field.value == 'mode') {
- return true
- }
- else {
- window.location="error.html"
- return false
- }
- }
- </script>
-</head>
-<body>
- <div id='container'>
- <h1>Login Page</h1>
- <p>Please input your user name and password and click the login button.</p>
- <form name='login_form' action="welcome.html" method="post" onsubmit="return login()">
- <table>
- <tr>
- <td>User Name:</td>
- <td><input name="username_field" size="30" type="text" /></td>
- </tr>
- <tr>
- <td>Password:</td>
- <td><input name="password_field" size="30" type="password" /></td>
- </tr>
- <tr>
- <td>&nbsp;</td>
- <td><input name="login_button" type="submit" value="LOGIN" /></td>
- </tr>
- </table>
- </form>
- </div>
-</body>
-</html>
@@ -1,12 +0,0 @@
-<html>
-<head>
- <title>Welcome Page</title>
- <link href="demo.css" media="all" rel="stylesheet" type="text/css" />
-</head>
-<body>
- <div id='container'>
- <h1>Welcome Page</h1>
- <p>Login succeeded. Now you can <a href=".">logout</a>.</p>
- </div>
-</body>
-</html>
@@ -1,85 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright 2008-2011 Nokia Siemens Networks Oyj
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Simple HTTP server requiring only Python and no other preconditions.
-
-Server is started by running this script with argument 'start' and
-optional port number (default port 7272). Server root is the same
-directory where this script is situated. Server can be stopped either
-using Ctrl-C or running this script with argument 'stop' and same port
-number as when starting it.
-"""
-
-import os
-import sys
-import httplib
-import BaseHTTPServer
-import SimpleHTTPServer
-
-
-DEFAULT_PORT = 7272
-DEFAULT_HOST = 'localhost'
-
-
-class StoppableHttpServer(BaseHTTPServer.HTTPServer):
-
- def serve_forever(self):
- self.stop = False
- while not self.stop:
- try:
- self.handle_request()
- except KeyboardInterrupt:
- break
-
-
-class StoppableHttpRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
-
- def do_QUIT(self):
- self.send_response(200)
- self.end_headers()
- self.server.stop = True
-
- def do_POST(self):
- # We could also process paremeters here using something like below.
- # length = self.headers['Content-Length']
- # print self.rfile.read(int(length))
- self.do_GET()
-
-
-def start_server(host=DEFAULT_HOST, port=DEFAULT_PORT):
- print "Demo application starting on port %s" % port
- root = os.path.dirname(os.path.abspath(__file__))
- os.chdir(root)
- server = StoppableHttpServer((host, int(port)), StoppableHttpRequestHandler)
- server.serve_forever()
-
-def stop_server(host=DEFAULT_HOST, port=DEFAULT_PORT):
- print "Demo application on port %s stopping" % port
- conn = httplib.HTTPConnection("%s:%s" % (host, port))
- conn.request("QUIT", "/")
- conn.getresponse()
-
-def print_help():
- print __doc__
-
-
-if __name__ == '__main__':
- try:
- {'start': start_server,
- 'stop': stop_server,
- 'help': print_help}[sys.argv[1]](*sys.argv[2:])
- except (IndexError, KeyError, TypeError):
- print 'Usage: %s start|stop|help [port]' % os.path.basename(sys.argv[0])
Oops, something went wrong.

0 comments on commit e6e180d

Please sign in to comment.