Selenium2Library | Web testing library for Robot Framework | Test Automation library
kandi X-RAY | Selenium2Library Summary
kandi X-RAY | Selenium2Library Summary
Web testing library for Robot Framework that has been renamed to SeleniumLibrary
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get the documentation for the given keyword .
Selenium2Library Key Features
Selenium2Library Examples and Code Snippets
pip list
pip install --upgrade robotframework-selenium2library
Community Discussions
Trending Discussions on Selenium2Library
QUESTION
I wanna exit all nested for loops when ${port} == 3,however whatever keywords I use, such as 'Exit for loop' or 'Exit for loop if ${port} == 3' ,it will still continue the whole nested for loop. Meanwhile Robot Framework ride tells me that 'break' is a reserved keyword and can't be used. My code is below.
...ANSWER
Answered 2022-Mar-08 at 04:30Easiest way to achieve this is to move the enclosing FOR loops into a keyword and then return from it whenever a condition is met. In your case it will look like this:
QUESTION
*** Settings ***
Library Selenium2Library
*** Variable ***
${handles}
*** Test Case ***
Testing
open browser https://www.reddit.com/ chrome
Execute Javascript window.open('https://www.google.com')
Execute Javascript window.open('https://www.yahoo.com')
Execute Javascript window.open('https://images.google.com')
${handles}= Get Window Handles
Set Global Variable ${handles}
FOR ${rowIndex} IN RANGE 1 18
Select Window ${handles}[${rowIndex}]
END
...ANSWER
Answered 2022-Jan-27 at 22:48Select Window
was deprecated a long time ago, and finally removed in SeleniumLibrary
version 5. You should use Switch Window instead.
QUESTION
my requirements.txt
file looks like this:
ANSWER
Answered 2021-Jul-13 at 09:23According to this, looks like Rabbitmq library can be installed only with 3.0.4
version.
In this topic it was suggested to install rabbit first and then after it run pip install --upgrade robotframework
, which worked pretty well.
So, install RF==3.0.4, install RMQ library and then upgrade FR to newest version.
QUESTION
I wanted to do a test with the DataDriver library, but it doesn't seem to work, I have the following error:
...ANSWER
Answered 2021-Apr-10 at 09:03In Robot Framework 4.0 a backward incompatible change has been introduced: Running and result models have been changed. One part of that change is the following:
In 4.0 the robot.running.model.TestCase
class has lineno
attribute.
Before 4.0, for example in 3.1.2 the robot.running.model.TestCase
class does not have lineno
attribute.
Given the DataDriver wants to use lineno
I would say your framework version is lower than 4.0 and you need to upgrade to the latest release.
QUESTION
In Robot Framework, is it possible to get the WebDriver instance from the Selenium2library and use it in Python code? What I wanna do is extend the Selenium2Library with some custom functions. But I need the WebDriver instance to do that.
...ANSWER
Answered 2021-Mar-13 at 15:10Selenium2Library is no longer supported. The newest version of robot's selenium library is SeleniumLibrary. If you are using SeleniumLibrary
rather than the outdated Selenium2Library
, you can access the actual webdriver instance like so:
QUESTION
I'm new to RobotFrameWork and I'm currently setting up everything on my machine to be able to use this tool for some of my test scenarios.
The issue that I'm getting is the following:
...ANSWER
Answered 2021-Mar-08 at 04:48You have the wrong case for Selenium2library
- it is named Selenium2Library
(capital "L"). Also, that library is very old and not supported. You should upgrade to SeleniumLibrary
QUESTION
I am new to this run keyword if method.
I wanted to enter different number based on specific page.
e.g. if page1 element is detected then input number 1, if page2 then input number 2.
...ANSWER
Answered 2020-Dec-21 at 10:11You got syntax error because Run Keyword If
expects a valid Python condition as first argument. This is not the case in your code. In your case this is what happens, assuming ${ANDROID-WIDGET-TEXT-VIEW}
is just view
in this example:
QUESTION
I'm testing a website which is not exactly designed for automation testing. I'm using Robot Framework, Selenium2Library. There's an element that I cannot locate it by x-path
the web driver will always locate to another element. Is there anyway to get the element by its text ?
The example HTML looks like
...ANSWER
Answered 2020-Dec-17 at 09:23You can get that element by text using xPath as well:
QUESTION
I have installed Robot Framework for multiple machines. There are python2 and python3 and packeges for them on both. The process of the installation was the same. On machine A
there are more Execution Profile (jybot
, pybot
, robot
, robot 3.1
) while on the other (B
) there are only jybot
and pybot
if I start RIDE with python2 and jybot
and robot
if python3.
What is the difference, or how can I add more Execution Profiles for RIDE?
- Python 2.7.11
- robotframework==3.0
- robotframework-ride==1.5.2.1
- Python 3.7.4
- robotframework==3.1.2
- robotframework-ride==1.7.3.1
There is no robotframework related difference in PATH
EDIT
Machine A
python2 robotframework related packages
...ANSWER
Answered 2020-Dec-17 at 11:15The detection of robot executable is not dependent on the version of RIDE, but on the installed version in Python. But this may result in different robot being executed when running tests. When the test is executed, it should use the robot as it would if launched from command line.
Like was mentioned by Bence Kaulics, pybot
was renamed to robot
from certain version. And in version 3.1.x, robot was changed to an executable instead of a .bat file (in Windows). That was the reason to have both robot
and robot 3.1
. So, in Windows, when selecting robot
you may be executing a robot.cmd
script. The same is valid for pybot.bat
with profile pybot
.
EDIT:
You can compare the settings.cfg
file from the two machines. See it at ~/.robotframework/ride/settings.cfg
(or %APPDATA%\robotframework\ride\settings.cfg
), on the [Plugins][[Test Runner]] section, the run_profiles
property is defined there.
QUESTION
I was working on the conversion of Selenium2Library to SeleniumLibrary. because of some issue we decided to keep Selenium2Library and now I see Unexpected error: No library 'Selenium2Library' found. I have below package but I updated eyes to v4. Anyone faced this issue??
...ANSWER
Answered 2020-Apr-10 at 22:30Newer versions of SeleniumLibrary creates and alias for Selenium2Library. You should do a complete uninstall of SeleniumLibrary and a re-install of Selenium2Library. Maybe you need to downgrade eyes. Also the version of Selenium must match the Selenium2Library maximum supported version.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Selenium2Library
You can use Selenium2Library like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page