Questions tagged [selenium4]

Selenium 4.0 is a new version of open-source tool/framework for automating web browsers. When using this tag, also include other tags for the specific components you are using, e.g. gecko driver. It does support all latest browsers.

Selenium is an umbrella project for a range of tools and libraries that enable and support the automation of web browsers.

It provides extensions to emulate user interaction with browsers, a distribution server for scaling browser allocation, and the infrastructure for implementations of the W3C WebDriver specification that lets you write interchangeable code for all major web browsers.

Selenium 4.0 is the upcoming new version of .


Change Logs

Link to the changelongs of the selenium clients:


Reference Links

195 questions
3
votes
1 answer

selenium-4 - Not able to handle HasAuthentication popup with Remote driver

I was trying to handle authetication popup and is working fine in local (when we create webdriver instance with chromeDriver). But if we try with RemoteWebDriver, we are getting below mentioned exception. Our problem is to handle authentication pop…
3
votes
0 answers

Storing network request Captured using chrome dev tools in a map

I have one query in Selenium 4. Chrome exposed devtools and we are able to get network request response header as shown below, but as "addListener" method accept 2nd param as Consumer Interface so is it possible to store the headers we are printing…
Amit Jain
  • 4,389
  • 2
  • 18
  • 21
3
votes
0 answers

How to get performance LOG on EDGE driver

Hello i am trying to using same code to retrieve performance log from both Chrome and Edge to scan for errors , however for edge i am getting org.openqa.selenium.InvalidArgumentException: invalid argument: log type 'performance' not found (Session…
2
votes
0 answers

Selenium with Firefox GeckoDriver list up as WebDriver Present

I was trying to make a selenium bot that executes through firefox geckodriver but when I use AntiBot detection website like (https://bot.sannysoft.com/) it shows WebDriver as present. Antibot shows WebDriver as present I tried the same test on…
2
votes
3 answers

Undetected chromedriver not working with selenium 4.10

Just upgraded to selenium 4.10 and got: TypeError: init() got an unexpected keyword argument 'executable_path' I read that executable path not needed in latest version and the fix is: from selenium.webdriver.chrome.service import Service service =…
2
votes
1 answer

AddListener(DevToolsEventListener \*) subscribing a listener to the already connected DevToolsClient error with ChromeDriver and Selenium Java

I am using: chrome driver version 110.0.5481.178 My System Chrome Version 110.0.5481.178 Java version 17.0.5 Java server 4.8.1 also previously used 4.7** The system is showing the below-mentioned error: Starting ChromeDriver 110.0.5481.77…
2
votes
0 answers

DesiredCapabilities.android() is throwing an error "The method android() is undefined for the type DesiredCapabilities"

DesiredCapabilities.android() is throwing an error "The method android() is undefined for the type DesiredCapabilities" DesiredCapabilities capabilities = DesiredCapabilities.android(); capabilities.setCapability("proxy",…
2
votes
2 answers

Updating Selenium Python to v4.8.0 "options.headless = True" shows DeprecationWarning

I have followed the change exact but it doesn't work, are there any other bugs? https://www.selenium.dev/blog/2023/headless-is-going-away/ import time import pandas as pd from selenium import webdriver from selenium.webdriver import Chrome from…
2
votes
1 answer

How to locate the First Name element within #shadow-root (open) using Selenium4 and Java

I am trying to find the element of the field First Name on the page https://whitelabel.sandbox.array.io/signup?platform=v3. I tried searching by id, classname, name, cssSelector, etc. but none works. I even added waiter to ensure it is loaded well…
2
votes
2 answers

How to find the neighbour element of an active element using Selenium with Python or Perl

This is a inverse question of $driver.get_element_by_xpath(....) Background I have a series of dynamically generated pages to parse. The target element doesn't have a good locator, xpath, text, or id. However, the neighbor element has a unique…
oldpride
  • 761
  • 7
  • 15
2
votes
2 answers

Maximizing Selenium Window without a Monitor?

Currently, I'm running Selenium v4 locally on a normal PC with a graphics card and monitor. However, in production, I plan on running Selenium on a server that does not have a monitor. When I call: driver.maximize() it maximizes the browser the the…
2
votes
4 answers

Selenium TypeError: __init__() got an unexpected keyword argument 'service'

I'm refactoring my app from procedural code to OOP. I am trying to do this Driver class. UPDATE: this works in Windows but not in Mac. # IMPORTS from sys import platform import os from os import system from selenium import webdriver from…
AppCreator
  • 241
  • 1
  • 2
  • 11
2
votes
2 answers

Selenium 4 : Getting java.lang.NoSuchMethodError: org.openqa.selenium.WebElement.getDomAttribute(Ljava/lang/String;)Ljava/lang/String;

I am using selenium "4.1.2" with chrome 97. While selecting value from drop down using select class, getting exception: java.lang.NoSuchMethodError: org.openqa.selenium.WebElement.getDomAttribute(Ljava/lang/String;)Ljava/lang/String; Below are…
sam
  • 289
  • 7
  • 19
2
votes
2 answers

Waiting for elements with PowerShell and Selenium 4

I am working on updating some PowerShell code that previously worked with Selenium 3.141. I have the following code snippet: Add-Type -LiteralPath "$seleniumPath\lib\net48\WebDriver.dll" Add-Type -LiteralPath…
StackExchangeGuy
  • 741
  • 16
  • 36
2
votes
1 answer

Python: How to add Firefox extensions in Selenium 4

The last version I used of Selenium was 3.141.0. I am now transitioning to Selenium 4, and I am trying to figure out how to add extensions for Firefox, in Python 3. Previously, something like this would work: from selenium import webdriver profile…
P A N
  • 5,642
  • 15
  • 52
  • 103
1
2
3
12 13