7
votes
Why this "WebDriver driver = new ChromeDriver();" Not this "ChromeDriver driver= new ChromeDriver();"
We generally do it this way because usually we want to be able to run our tests on multiple browsers. If we declare the driver as a specific driver type, we are then anchored to only that driver. ...
7
votes
Using Python Selenium Not able to perform click operation
Try using JavaScriptExecutor
C#
IWebElement element = driver.FindElement(By.XPath("//button[@role='button']"));
IJavaScriptExecutor jse2 = (IJavaScriptExecutor)driver;
jse2.ExecuteScript("arguments[...
5
votes
Accepted
What is geckodriver? How to use it in Selenium Webdriver?
GeckoDriver:
A Proxy for using W3C WebDriver-compatible clients to interact with Gecko-based browsers. Geckodriver provides HTTP API described by the WebDriver protocol to communicate with Gecko ...
5
votes
How to get max character count for input fields with selenium webdriver
You can find the field and get the maxlength attribute
max_length=find('input#id').getAttribute('maxlength')
In the IDE I think it would be something like this to store it in 'x':
<td>...
4
votes
Why this "WebDriver driver = new ChromeDriver();" Not this "ChromeDriver driver= new ChromeDriver();"
Absolutely right, Good explanation provided by @Bill Hileman, I was already upvoted it.
In addition to clear this doubt you need to understand What is WebDriver and ChromeDriver/Firefoxdriver.
...
4
votes
Accepted
Geckodriver: How to use "moz:firefoxOptions" on node.config for selenium grid
Unfortunatelly I found only workaround solution (e.g. if you need several different Firefox versions on a single station):
nodeConfig_1.json
{
"capabilities": [
{
"browserName": "firefox"...
4
votes
Accepted
How to parameterize @findBy in pageFactory
Unfortunately, it's not possible to send arguments to annotation (reference)
One possible solution would be to create a Page Object class for link and pass a WebElement based on its li node.
Class ...
3
votes
geckodriver with Selenium 3.0 driver.get() dosnt navigate to the URL
Selenium recently launched its one of the major release, i.e., Selenium 3 – beta. You can download it from here-
Download Selenium 3.0-Beta .
In this new version, one of the major change is the way ...
3
votes
Accepted
Updates in Selenium 3 over Selenium 2
Good question, everyone should aware of the new updates and features in Selenium 3.
As of my experience Selenium 3 has lots changes made in configuration/setup level. Even though we have to use ...
3
votes
Accepted
GeckoDriver error in TestNG that works in plain JAVA
The syntax for setProperty() method is:
System.setProperty("<driver we want to use in the program>",
"<path where the driver exists>");
As per the question,
In java ...
3
votes
Accepted
Selenium 3.0: Getting exception every time while launching firefox in remotewebdriver
Coming to your first question-
How to resolve exception while launching firefox in remotewebdriver:
First thing what I observed that-
You have to change your code in Setup; as you are using ...
3
votes
Find first IMG element using XPATH
This will get you the first result's img element:
(//a[@class='_1UoZlX']//img)[1]
Honestly though, this is a rat's nest from hell. If I were you I'd have a serious discussion with the developers ...
3
votes
Is there a way to use Selenium 3 to automate testing in Safari 11 without the 'glass pane'?
The short answer is no.
The longer answer is I'm not 100% sure but I'm fairly confident the answer is no.
I've worked at Sauce Labs for a few years now, several of them in support. I've done a lot of ...
3
votes
How to Handle successful submission of a form in Selenium?
There are no ways to check if you have logged in successfully other than the real users would use.
If you log in successfully then you should see some elements that the guest would not see (e.g. the ...
3
votes
Selenium Webdriver TestNG (Java) using While loop for all tests
You shouldn't use while loops to provide test data to your tests if you use some dedicated test frameworks like TestNg.
Instead you should use the mechanisms provided by such frameworks. For TestNg ...
3
votes
How to fetch username and password from excel one by one to test login functionality in robot framework-selenium-python
I am not sure what the code you have there do as it is incomplete.
So assuming that you want to do data driven testing, use RobotFramework-datadriver: Structure of data file.
Installation:
pip install ...
3
votes
Accepted
How to click pop up window button in selenium with Pyhton
use xpath or css
css :
[class="message-component message-button no-children pg-accept-button"]
driver.find_elements_by_css_selector('[class="message-component message-button no-...
2
votes
How to get max character count for input fields with selenium webdriver
Different scenarios:
1) maxlength attribute
In HTML you might have a maxlength attribute on your input tag. In this case you can extract the value with Selenium's GetAttribute("maxlength") or ...
2
votes
Accepted
How to reliably maintain a desktop session while running selenium node on windows VM?
The most reliable method I've found is to configure the VMs to auto-logon with an administrator-level login and disable screensaver and user access control. This effectively means that whenever the vm ...
2
votes
Getting different results using selenium and iFrames on Firefox 63, Chrome 69 and Chrome 70
Have you updated chrome driver as well? – Alexey R. Oct 30 '18 at
16:13
Resolved !
Upgrading to Chromedriver 2.43 did the trick.
Latest Release: ChromeDriver 2.43
Supports Chrome v69-71
Changes ...
2
votes
To use direct page URL or complete path?
Like a lot of things in life, it depends.
Both options you lay out will work for test automation. However, what is your overall goal?
Are you testing a feature that is on one page? If so, you can ...
2
votes
Using Python Selenium Not able to perform click operation
Reason:
This is a known issue for some time now.
https://github.com/SeleniumHQ/selenium/search?q=ElementClickInterceptedException&type=Issues
This exception suggests that there is another element (...
2
votes
Accepted
How can I handle the chrome HTTP Authentication popup window in selenium without AutoIT?
Authentication via the URL has been deprecated for a while:
While this may sound like a thunder from clear skies for Chrome users,
it is not. The deprecation “order” comes from RFC 3986: ...
3.2.1. ...
2
votes
How can I handle the chrome HTTP Authentication popup window in selenium without AutoIT?
Despite you have chosen Niels answer as correct, I would also suggest a way to work around your issue.
What you're talking about is likely a "basic authentication". The best way to bypass ...
2
votes
What is the purpose of creating a BaseTest class which declares a global static WebDriver object in POM framework?
In your code, I think you have mixed two approaches together.
Using Base Class
Without Using Base Class
In Approach 1:
You don't have to assign a driver to a local variable if you are using a base ...
2
votes
Checkbox gets unchecked even though the Code is written to only select the checkbox..can someone pls help
The approach you are using works only with native check-boxes (i.e. <input type="checkbox"/>). What you have is a custom element that looks like a check-box and behaves like a check-...
1
vote
Confused between WebDriverWait and FluentWait
FluentWait:
According to your code snippet, it will wait for the expected web element upto 30 seconds. And it will check the condition (or in simple words, look for the element) every 5 seconds within ...
1
vote
Accepted
Adding a stickynote on site using toolbar
This appears to be an issue with the driver losing track of the click on the note as soon as the click on the image occurs. This is pretty common with some types of dropdowns, but applies in other ...
1
vote
Find first IMG element using XPATH
I would just let Selenium find the first img element - no need to do it via XPath manually:
IWebElement firstImage = driver.FindElement(By.TagName("img"));
Or, if you want to do it in the scope of ...
1
vote
What is geckodriver? How to use it in Selenium Webdriver?
Lot of article are present on internet regarding GeckoDriver and Selenium 3.
Gecko is a webbrowser-engine used in many applications developed by Mozilla Foundation and the Mozilla Corporation
Gecko ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
selenium3 × 72selenium-webdriver × 68
automated-testing × 30
java × 18
selenium2 × 12
python × 9
firefoxdriver × 8
browser-automation × 5
page-factory × 5
page-objects × 4
chromedriver × 4
testng × 3
cucumber × 3
test-automation-framework × 2
javascript × 2
robotframework × 2
selenium-webdriver-c# × 2
grid × 2
c# × 1
xpath × 1
web-application × 1
selenium-ide × 1
interview × 1
visualstudio × 1
ruby × 1