Code Monkey home page Code Monkey logo

oldseleniumlibrary's Introduction

Robot Framework

Introduction

Robot Framework ® is a generic open source automation framework for acceptance testing, acceptance test driven development (ATDD), and robotic process automation (RPA). It has simple plain text syntax and it can be extended easily with generic and custom libraries.

Robot Framework is operating system and application independent. It is implemented using Python which is also the primary language to extend it. The framework has a rich ecosystem around it consisting of various generic libraries and tools that are developed as separate projects. For more information about Robot Framework and the ecosystem, see http://robotframework.org.

Robot Framework project is hosted on GitHub where you can find source code, an issue tracker, and some further documentation. Downloads are hosted on PyPI.

Robot Framework development is sponsored by non-profit Robot Framework Foundation. If you are using the framework and benefiting from it, consider joining the foundation to help maintaining the framework and developing it further.

Latest version

License

Installation

If you already have Python with pip installed, you can simply run:

pip install robotframework

For more detailed installation instructions, including installing Python, see INSTALL.rst.

Robot Framework requires Python 3.8 or newer and runs also on PyPy. The latest version that supports Python 3.6 and 3.7 is Robot Framework 6.1.1. If you need to use Python 2, Jython or IronPython, you can use Robot Framework 4.1.3.

Example

Below is a simple example test case for testing login to some system. You can find more examples with links to related demo projects from http://robotframework.org.

*** Settings ***
Documentation     A test suite with a single test for valid login.
...
...               This test has a workflow that is created using keywords in
...               the imported resource file.
Resource          login.resource

*** Test Cases ***
Valid Login
    Open Browser To Login Page
    Input Username    demo
    Input Password    mode
    Submit Credentials
    Welcome Page Should Be Open
    [Teardown]    Close Browser

Usage

Tests (or tasks) are executed from the command line using the robot command or by executing the robot module directly like python -m robot .

The basic usage is giving a path to a test (or task) file or directory as an argument with possible command line options before the path:

robot tests.robot
robot --variable BROWSER:Firefox --outputdir results path/to/tests/

Additionally, there is the rebot tool for combining results and otherwise post-processing outputs:

rebot --name Example output1.xml output2.xml

Run robot --help and rebot --help for more information about the command line usage. For a complete reference manual see Robot Framework User Guide.

Documentation

Support and Contact

Contributing

Interested to contribute to Robot Framework? Great! In that case it is a good start by looking at the CONTRIBUTING.rst. If you do not already have an issue you would like to work on, you can check issues with good new issue and help wanted labels.

Remember also that there are many other tools and libraries in the wider Robot Framework ecosystem that you can contribute to!

License and Trademark

Robot Framework is open source software provided under the Apache License 2.0. Robot Framework documentation and other similar content use the Creative Commons Attribution 3.0 Unported license. Most libraries and tools in the ecosystem are also open source, but they may use different licenses.

Robot Framework trademark is owned by Robot Framework Foundation.

oldseleniumlibrary's People

Contributors

jrantanen avatar jussimalinen avatar khusa avatar mkorpela avatar pekkaklarck avatar rspielmann avatar spooning avatar yanne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oldseleniumlibrary's Issues

'Page Should Contain ...' should have 2 arguments, including text to display when failed

Originally submitted to Google Code by marcinet on 27 Nov 2008

I have some locators who have meaningless names, like:
//div[@⁠id='bodycontent']/div/span[3]/div[1]/a/img
When I use 'Page should contain Element' keyword, I'd like to have the
possibility to describe the element better when the action fails.

The easiest way would be to add a second optional argument, like in
'BuiltIn.Should Contain' keyword. The second argument would be a text to
display when failed.

I suggest to have this possibility in all the 'Page Should Contain ...'
keywords.

Posibility for users to specify UPPERCASED and multi worded strings for the test browser

Originally submitted to Google Code by santiycr on 22 Jul 2009

Hi, I'm a dev in SauceLabs, a Selenium-in-the-cloud service and some of our
clients are using this library.
Because of the way our service work, we need our clients to be able to use
browser strings as the following:

'{"username": "user", "access-key": "7A9cea40-84f7-4d3b-8748-0e94fCd4dX4f",
"os": "Windows 2003", "browser": "firefox", "browser-version": "3."}'

The problem now is that the string is being striped and lowercased in the
Open method.

I've attached a patch that will allow the users to use an uppercased or
multi-worded string for their tests and will also be backwards compatible
for users that used strings as: "FF", "IE", "f f" or "F f".

rundemo.(sh|bat) don't work out-of-the-box from the standalone demo

Originally submitted to Google Code by @pekkaklarck on 31 Jul 2008

Both rundemo.sh and rundemo.bat, as well as startapps.sh and startapps.bat,
have path to the selenium-server.jar in format
'../src/SeleniumServer/....', which does not work when using the standalone
demo.

The best solution is probably rewriting these scripts in Python, since then
we can get the path to the installation directory e.g. with "from
SeleniumLibrary import file as selpath". Additionally, there would be
less stuff to maintain and we didn't need to play with horrid batchfiles
anymore.

This is quite a big problem since it makes using the demo harder. I think
it should be fixed asap, but there's probably no need to have new release
since this affects only the standalone demo and it is distributed separately.

`Page Should Contain Button` and `Page Should Not Contain Button` keywords

Originally submitted to Google Code by kkreddy1... on 15 Feb 2009

What steps will reproduce the problem?

  1. currently the selenium library doesnot have keyword options as "page
    should contain button and page shouldnot contain button keywords"
  2. try to add these two keywords to seleniumlibrary
    3.

What is the expected output? What do you see instead?
page should contain button and page should not contain button keywords
needs to be present in selenium library

What version of the product are you using? On what operating system?
selenium library 2.1.2

Please provide any additional information below.

Currently I am using selenium library with robot frame work for testing
gui based application. I found some keywords are missing from library.
they are "page should contain button" and "page should not contain button".

Take new libdoc.py into use and add ROBOT_LIBRARY_VERSION

Originally submitted to Google Code by @pekkaklarck on 1 Dec 2008

libdoc.py coming with Robot Framework 2.0.3 has some new enhancements
(mainly ability to document also library initialization) and it should be
taken into use with this lib.

Additionally, ROBOT_LIBRARY_VERSION should be added to the lib. This info
should be read dynamically so that it doesn't need to be updated in several
places.

Documentation enhancements

Originally submitted to Google Code by @pekkaklarck on 8 Oct 2008

  1. Update to use new libdoc.py styles (internal linkin etc.)

  2. Possible browser name formats in 'Open Browser' should be explained in a
    list or table so that it is easier to find that information.

  3. 'Open Browser' should mention that also 'IE' works as browser name. (At
    least it should!)

  4. Both comments in 'Click Link' example should be in third column.

Keyword should be added for maximizing browser in Selenium Libraray.

Originally submitted to Google Code by mpbongirwar on 17 Jun 2009

I discussed this issue with rf-users already.I got the following solution

The selenium command to maximize the browser isn't implemented by default.
You can easily add it by extending SeleniumLibrary:

from SeleniumLibrary import SeleniumLibrary
class MyExtendedSeleniumLibrary(SeleniumLibrary):
def maximize_browser(self):
"""Maximizes the current browser window."""
self._selenium.window_maximize()

After that import MyExtendedSeleniumLibrary instead of SeleniumLibrary
in your tests. You could hack that directly into SeleniumLibrary, too,
but that would force you to merge sources everytime you want to update
SeleniumLibrary.

Please add this enhancement in next realease.

Cannot slect and test Modal Dialogues. When popup test is frozen

Originally submitted to Google Code by m.marag... on 12 Oct 2008

What steps will reproduce the problem?

  1. Try to use a page that will display a popup window. i.e an
    authentication dialogue
  2. Cannot select it and enter the required info , thus test is stack...
    3.

What is the expected output? What do you see instead?
Should be able to select the popup and enter required info and submit it

What version of the product are you using? On what operating system?
Robot framework 2.02 with latest selenium on ubuntu 8.04 or RHEL 4.6

Please provide any additional information below.

Click image keyword should also work for images inside form

Originally submitted to Google Code by m.marag... on 20 Nov 2008

What steps will reproduce the problem?

  1. click image in a page with source similar to the following

<FORM ACTION='/opt/cgi-bin/example.cgi' METHOD='POST'>
<H3>Example</H3>
<TABLE BORDER=1>
<TR><TD><B>A List</B></TD><TD>
<SELECT NAME='1' SIZE=1><OPTION VALUE='(empty)'>No selection</OPTION>
<OPTION SELECTED VALUE='hello'>hellot</OPTION>
</SELECT></TD></TR>
<TR><TD><B>Example...</B></TD><TD><INPUT NAME='10' TYPE=TEXT SIZE=10
VALUE='14' MAXLENGTH=10></TD><TR>
</TABLE><br><br>
<INPUT TYPE=IMAGE SRC='/images/savebutton.gif' BORDER=0></FORM>

What is the expected output? What do you see instead?

ERROR: Element xpath=//img[@⁠id="/images/savebutton.gif" or
@⁠src="/images/savebutton.gif" or @⁠alt="/images/savebutton.gif"] not found

What version of the product are you using? On what operating system?

Latest Selenium 2.0.2
Please provide any additional information below.

"Wait Until Page Contains" timeouts too early at IE6

Originally submitted to Google Code by teme.temppuilija on 5 Feb 2009

I have following line at the test file:

Wait Until Page Contains | ${SEARCHSTRING} | 10s

${SEARCHSTRING} = "Haluan itse valita"

This works fine with Firefox 3, but with IE6 the log results following kind
of line:

KEYWORD: SeleniumLibrary.Wait Until Page Contains ${SEARCHSTRING}, 10s
Documentation: Waits until text appears on current page or timeout expires.
Start / End / Elapsed: 20090205 10:41:03.937 / 20090205 10:41:04.000 /
00:00:00.063
10:41:04.000 INFO Waiting 10 seconds for condition 'window.find('Haluan
itse valita')' to be true.

10:41:04.000 FAIL Text 'Haluan itse valita' did not appear in '10 seconds'

So it timeouts in 0.063s which is much less than 10s.

Unable to launch new Browser after installing Python 26

Originally submitted to Google Code by infant.gerald on 31 Mar 2009

Please find the attached file and Error Logs. I am getting this consistent
error on all the New Machines I have been installing of late.

Issue 273 was raised under RobotFramework and Got closed stating it
belonged to Selenium Queue

I am completely blocked and any help will greatly help me in proceeding
further
Installation Steps:

  1. Install JRE ( Java Runtime Environment )
    http://java.com/en/download/manual.jsp
    Recommended Installation path – DEFAULT
  2. Install Python 2.6 available at
    http://www.python.org/download/releases/
    Recommended Installation path - DEFAULT
  3. Install latest Robotframework installers available at
    https://code.google.com/p/robotframework/downloads/list
    Current Latest Version: robotframework-2.0.4.win32.exe
  4. Install latest Selenium Library for RobotFramework available at
    https://code.google.com/p/robotframework-seleniumlibrary/downloads/list
    Current Latest Version: robotframework-seleniumlibrary-2.1.2.win32.exe
  5. Install Python Win 32 Extensions for Excel operations
    http://sourceforge.net/project/showfiles.php?
    group_id=78018&package_id=79063&release_id=661475

Problem with parameter -firefoxProfileTemplate

Originally submitted to Google Code by ribe... on 23 Jul 2009

Hello,
It is possible to add some documentation about how to use the option
-firefoxProfileTemplate
because in my tests it looks like it ignores the path. Where are the
profiles saved in linux?

I have firefox 2.0.0.9 installed and running the following command.

home/omc/michael/jdk1.6.0_14/bin/java -jar selenium-server.jar
-forcedBrowserMode *firefox -singleWindow -firefoxProfileTemplate
/home/omc/bla/firefox/defaults/profile

Enhancement: Add support for Selenium's cookie manipulation methods

Originally submitted to Google Code by c.martin.taylor on 28 Nov 2008

I implemented this and have attached the modified init.py file. Feel
free to incorporate it into the next revision of
robotframework-seleniumlibrary. The only method I really needed for my
testing was "delete_cookie", so that's the only one I've actually tested
under robotframework-seleniumlibrary. Since the other methods in the
_Cookies class are just direct wrappers for the corresponding Selenium
methods, I expect they will work, too.

Authentication info not kept during a testcase. Submit Form makes selenium to ask again for password.

Originally submitted to Google Code by m.marag... on 11 Oct 2008

What steps will reproduce the problem?

  1. Use apache with LDAP or Basic authentication
  2. Have a cgi-bin that opens a page and use selenium to login to that by
    entering the username and password into the url (user:pass@⁠http://etc...
  3. Some of the fields in the form are then filled in and the form
    cofiguration is submitted using the 'Submit Form' Keyword. Then the
    authentication popup is displayed again instead keeping the authentication
    info from the previous login.

What is the expected output? What do you see instead?

The expected outcome is to save the form without asking for a password again.
Submitting the form is not asking for authentication again when trying it
manually.

Had to disable the authentication to make this work

What version of the product are you using? On what operating system?

Latest Selenium library with robot framework 2.0. Tried it on Ubuntu 8.4
and RHEL 4.5. In both cases firefox 2.0 was used.

Please provide any additional information below.

`Maximize Browser Window` -keyword

Originally submitted to Google Code by dnvhanuman on 1 Jun 2009

I checked the selenium keywords but could not find any way to maximize the
IE/firefox window.

Is it possible to provide a keyword for the same.

Get Source, Create File, Get File gives UTF-8 decoding error

Originally submitted to Google Code by claes.piper on 26 Jan 2009

What steps will reproduce the problem?

  1. Get source from web page
  2. Save source to file
  3. Get file
  4. Compare saved file to source

Step 3 fails.

Example Test case:
Compare saved page to current page Open browser http://www.google.com *firefox
${currentPage}= Get Source
Create File ${TEMPDIR}${/}google-page1.html ${currentPage}
${savedPage}= Get File ${TEMPDIR}${/}google-page1.html UTF-8
Should Be Equal as Strings ${savedPage} ${currentPage}
Close Browser

What is the expected output? What do you see instead?
Expected: That the Get File command gets the file.
Error: UnicodeError: utf-8 decoding error: invalid data

Error message from the log

KEYWORD: ${savedPage} = OperatingSystem.Get File
${TEMPDIR}${/}google-page1.html, UTF-8
Documentation: Returns the contents of a specified file.
Start / End / Elapsed: 20090126 16:58:42.101 / 20090126 16:58:42.148 /
00:00:00.047
16:58:42.124 INFO Getting file
'C:\Users\CLAPIP~1.OME\AppData\Local\Temp\google-page1.html'
16:58:42.148 FAIL UnicodeError: utf-8 decoding error: invalid data

What version of the product are you using? On what operating system?
Robot Framwork 2.0.4
SeleniumLibrary 2.1.1
Python 2.6.1
Running on Windows Vista Ultimate

Please provide any additional information below.
Se diskussion:
http://groups.google.com/group/robotframework-users/browse_thread/thread/6cdae3b5f7e5bd30#

Running in a single window

Originally submitted to Google Code by radekw13 on 17 Jun 2009

Selenium server supports '-singleWindow' option that allows running test
cases in a single window.

It would be useful to be able to start the server with that option.

I used to have an extra library to start the server before 'Start Selenium
Server' keyword was made available where I would pass an extra parameter to
init to run in a single window mode.

I attach my now obsolete module.

Confirm Action -keyword

Originally submitted to Google Code by @yanne on 10 Nov 2008

Add new keyword Get Confirmation, based on this:

def get_confirmation(self):
"""
By default, the confirm function will return true, having the
same effect
as manually clicking OK."""
return self._selenium.get_confirmation()

Browser specific popup windows not recognised

Originally submitted to Google Code by kasarla1... on 10 Feb 2009

Hi,

I am using the below setup

Robo :2.0.4
Python :2.5.2
Selenium library :2.1.1

My application uses browser specific popup window to show/save/download an
output file

We could not recognize the popup window(as this is browser specific)

We need to recognize this window and perform some action.

Attached please find the screen shot of the popup window

Can you please help us in this context?

WBR,
Aravind Reddy K

`Get Text` keyword

Originally submitted to Google Code by teme.temppuilija on 25 Mar 2009

"Get Text" keyword should be visible at the test cases.

I have attached the patch which adds the keyword.

Is it possible to run Selenium IDE test case in robotframework

Originally submitted to Google Code by kkreddy1... on 27 Jan 2009

What steps will reproduce the problem?
1.Record playback option is not there in robotframework. It is difficult
to write the test cases in keyword-driven for Robot framework(Selenium IDE
having record/palyback options)
2.I would like to run the Selenium IDE test cases directly with Robot
framework. If not possible, let me know the alternative solution for the
above mentioned issue
3.

What is the expected output? What do you see instead?
Robot framework needs to be record/playback option or Selenium IDE test
cases can be executed directly from Robot framework

What version of the product are you using? On what operating system?
robotframework Version : robotframework-2[1].0.3
Operating system : Windows XP
Please provide any additional information below.

Currently I am using Selenium IDE and Robot framework test automation
tools for my project.
I have some questions regarding the above mentioned two automation
tools. Here are the questions

1- Is it possible to run Selenium IDE test case in Robot framework? If
possible, please let me know the procedure
2- If not possible, please let me know the alternative solution if
any.
3- Is it possible for record and play back the test cases with Robot
framework instead of writing test cases manually? (Record and playback
option is available in Selenium IDE)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.