seleniumhq.github.io | Official Selenium website and documentation | Functional Testing library
kandi X-RAY | seleniumhq.github.io Summary
kandi X-RAY | seleniumhq.github.io Summary
Official Selenium website and documentation
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of seleniumhq.github.io
seleniumhq.github.io Key Features
seleniumhq.github.io Examples and Code Snippets
Community Discussions
Trending Discussions on seleniumhq.github.io
QUESTION
I've been encountering an issue with trying to extract plain text from a WebElement using JavaScript selenium-webdriver. I'm currently using MicrosoftEdge browser and driver, everything is set up properly but I can't work out why trying to get values from WebElement is broken in JavaScript Selenium. For example, suppose the following document:
...ANSWER
Answered 2017-Mar-27 at 05:40getText and getAttribute return promises that resolve with the value requested.
QUESTION
I'm going through a process of upgrading my Selenium Hub/Nodes to version 3.3. Everything works fine, but I want to make sure I have optimal configuration... problem is I can't find a complete list of Hub/Node properties anywhere.
I've looked through:
- https://seleniumhq.github.io/docs/grid.html
- http://www.seleniumhq.org/docs/07_selenium_grid.jsp
- https://github.com/SeleniumHQ/selenium/wiki/Grid2
- https://github.com/SeleniumHQ/selenium/blob/master/java/server/src/org/openqa/grid/common/defaults/DefaultNodeWebDriver.json
- https://github.com/SeleniumHQ/selenium/blob/master/java/server/src/org/openqa/grid/common/defaults/DefaultHub.json
These docs only list some of the properties through example configs, but none of them seem like a complete list and more importantly none of them actually state what these properties do. Where is the documentation for a complete list of configuration properties for Selenium Hub/Nodes?
...ANSWER
Answered 2017-Apr-14 at 13:19This documentation is available via the Selenium standalone uber jar itself.
java -jar selenium-server-standalone-3.3.1.jar -help
QUESTION
I have scoured the documentation (what little there is) for selenium-webdriver located here (http://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_Capabilities.html)
I can't find out what the equivalent code from Java to NodeJS would be.
Here is the code in JAVA (which I am copying from here at the Test Configuration Options section, https://github.com/zalando/zalenium/blob/master/docs/usage_examples.md#initial-setup)
...ANSWER
Answered 2017-Oct-09 at 05:29Ok I found out the answer. Turns out you just define it as extra parameters in an object.
QUESTION
I have trouble understanding how to use an 'expected conditions' to check for the presence of an element. Given this documentation it is not clear at all how to use this. I have tried the following code
...ANSWER
Answered 2017-Dec-13 at 12:31The way expected conditions
work is by defining a WebDriverWait
. You create this with an instance of your WebDriver
and a timeout. The WebDriverWait
has an until()
method which will take an expected condition
and will wait until it has been met or until the timeout has passed. So instead of just EC.visibility_of_element_located((By.XPATH, '//*[@id="kernel_indicator_icon" and @title="Kernel Idle"]'))
you should use:
QUESTION
As the documentation states, you can call webdriver.FirefoxProfile() with the optional argument of profile_directory
to point to the directory of a specific profile you want the browser to use. I noticed it was taking a long time to run this command, so when I looked into the code, it looked like it was copying the specified profile Problem is, it takes an extremely long time for the profile to copy (something like >30 minutes, didn't have the patience to wait for it to finish.)
I'm using a hybrid of userscripts and selenium to do some automation for me, so to setup a new profile every single time I want to test out my code would be burdensome.
Is the only way to change this behaviour to edit the firefox_profile.py
itself (if so, what would be the best way to go about it?)?
ANSWER
Answered 2020-Feb-03 at 20:49As per the current implementation of GeckoDriver with Firefox using the FirefoxProfile()
works as follows :
If case of initiating a Browsing Session through a new Firefox Profile as follows :
QUESTION
I wrote some Javascript code with the touchstart
and touchmove
event. I want to test it using Selenium. I just discovered the TouchActions class with the move
method which appears to be exactly what I want.
My tests are run with a RemoteWebDriver:
...ANSWER
Answered 2019-Sep-17 at 09:21So, to be able to do that, one needs to first add the mobile capability to the driver (see Mobile Emulation):
QUESTION
I am using Selenium 3.5.3 and following is my code.
I am trying to use Firefox options in the constructor as in
https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/firefox/FirefoxDriver.html#FirefoxDriver-org.openqa.selenium.firefox.FirefoxOptions-
ANSWER
Answered 2017-Sep-06 at 09:21Try this code:
QUESTION
From within Java unit tests, I want to use Selenium to test my web page with Firefox. My tests require that I set an environment variable for Firefox. (Specifically, I want to set the DISPLAY variable.)
The FirefoxBinary
class has a method setEnvironmentProperty, which sounds like it should set environment variables for the environment the Firefox process runs in, but in practice it does not have that effect. (I have confirmed that with cat /proc//environ
.)
Back with selenium-java 3.0.1, I could build a GeckoDriverService
with custom environment variables, and the FirefoxDriver
constructor accepted the driver service as an argument, like so:
ANSWER
Answered 2017-Sep-08 at 16:08Would this website help? https://testautomationarchives.blogspot.com/2013/08/how-to-configure-selenium-webdriver.html.
Starting at Step 5 from the above site, since 1-4 are installing things:
Step 5 : Set Environment Variables (Windows 7 )
- Right Click On Computer
- Click on Properties
- Click On ‘Advance Settings’
- On ‘System Properties ‘ Click On tab ‘Advance’
- Click on ‘Environment Variables ‘
- Copy following path where JDK is installed. C:\Program Files\Java\jdk1.6.0\bin
- On Environment Variable Window Click ‘New’ Under System Variable and Set Path: C:\Program Files\Java\jdk1.6.0\bin. If Path Variable already Exist Then Edit it .
- Set CLASSPATH : Copy following Path Where JDK is installed :
- On Environment Variable Window Click ‘New’ under User Variables and Set CLASSPATH :
- Enviornment is set up now start JAVA IDE
QUESTION
I would like to know how i can add an unpacked extension that i have on my computeur to my chrome webdriver using this : https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Options.html#addExtensions I don't really understand what im supposed to do with it.. Thanks in advance to everybody that will help me =) P.S : Im using these node packages : selenium-webdriver, fs
...ANSWER
Answered 2018-Jul-05 at 01:35You can do like this:
QUESTION
What is pause(Duration duration) present under actions class in selenium webDriver ?
This link : Selenium docs Has not provided enough information about pause method.
By method name and argument type it's seems like it will take Duration Object and this is how I had initialize it :
ANSWER
Answered 2018-Apr-03 at 07:47pause() method allows you to have a sleep inside an action
chain as it returns the Actions
back. So if you need to put a sleep between two actions it is useful. Otherwise you will have to split the actions
and have a sleep()
in between the two,
There is another overloaded method of pause()
which takes a long for milliseconds as parameter. Easier to use this one, but it is an individual preference.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install seleniumhq.github.io
Follow the Install Hugo instructions from Docsy
Clone this repository
Run git submodule update --init --recursive
Run cd website_and_docs
Run hugo server
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