Questions tagged [selenium-webdriver]

Selenium WebDriver offers a versatile WebDriver API that allows developers to manipulate web browsers using various programming languages. Make sure to include a tag for the specific programming language you are utilizing.

Discover the steps to automate the printing frame

As I work to streamline tasks at my company, I've encountered an issue when trying to print to PDF and save it as a file. The problem arises when a specific pop-up frame appears, causing Selenium to stop working. I attempted using driver.forward(), b ...

Selenium grid is having trouble locating an element with the CSS selector

I'm having trouble locating the Submit button in my HTML structure: <div> <span class="combutton"><a href="javascript:void(0);">Submit</a></span> </div> <div> <span class="combutton"><a href="# ...

Error message: "Execution of taskkill executable not found in Selenium WebDriver"

Every time I run the driver.quit() command, it successfully opens and quits the firefox browser but I keep getting an error message saying "Unable to find executable for: taskkill". I have already set the environment variable PATH to "C:\Windows&bso ...

How can you establish the duration for which a WebDriver instance in Python - Selenium2 should await the loading of a page before triggering a timeout exception?

I attempted to set up a webdriver with a specified time out, demonstrated in the code below: self.driver = webdriver.Firefox(None, None, 5) Afterwards, I used the driver to retrieve a web page like this: self.driver.get("http://www.google.com") However ...

Encountered an obstacle while running some Java code using Selenium

To begin, you will need to import the following two packages: org.openqa.selenium.*- includes the WebDriver class required to create a new browser with a specific driver org.openqa.selenium.firefox.FirefoxDriver - includes the FirefoxDriver class needed t ...

How can I use Selenium to open a webpage without pausing the script?

I am facing an issue where all the code execution after driver.get(url) is halted until the page finishes loading. I want to avoid this behavior, so I am looking for alternative methods or perhaps a way to make the get method non-blocking. Is there any s ...

Navigating the Web Browser Console with Selenium: A Complete Guide

Currently utilizing Selenium version 2.46.0, I'm on a quest to debug various issues, particularly client-related ones. My goal is to extract all contents from the web browser console, including errors and warnings. My initial attempt involved the followin ...

Utilizing Selenium WebDriver to Locate Elements Using Relative XPath Based on Their Text Content

I am currently utilizing Selenium webdriver in conjunction with Java. My main challenge lies in identifying elements within dynamic dropdown lists, as accessing them by exact id/name/xpath is proving to be difficult. I have resorted to locating these elem ...

Unable to click on element in Firefox browser

Encountering an issue with the following error message: Element is not clickable at point (791, 394). Other element would receive the click: Command duration or timeout: 66 milliseconds Any ideas on what's causing this? Using selenium web driver version ...

Develop a Python binary file incorporating the Selenium webdriver manager

I am trying to convert my Selenium code into an executable file. I have previously used auto-py-to-exe for non-Selenium codes, but I am facing difficulties with this particular project. While searching for a solution, I came across a suggestion provided i ...

Getting started with Jmeter Web Driver: launching WDS within a pre-existing Chrome session

To validate a web request, I must launch Jmeter and link it to an existing Google Chrome session. The necessary components have been included in Jmeter: jp@gc - Chrome Driver Config jp@gc - WebDriver Sampler However, I am stuck on finding the correct code ...

WebDriverManager unable to connect with PhantomJSDriver

I am facing an issue with using WebDriverManager. I want to use PhantomJSDriver without manually setting a system property like this: System.setProperty("phantomjs.binary.path", "E:/phantomjs-2.1.1-windows/bin/phantomjs.exe"); In my pom.xml, I have these ...

Having trouble exporting data to an excel file using Selenium WebDriver and Apache POI

Just getting started with Selenium Web automation, so go easy on me. I've put together a method to write an array's content to an excel sheet. No errors or exceptions are popping up, but the data isn't showing up in the excel sheet as expec ...

The hover functionality is not functioning as expected on the demo website when using Selenium WebDriver

I have attempted to use the following code. public class LocateMultipleItems { public static void main(String[] args) { WebDriver driver = new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); dr ...

The dropdown menu in Selenium is experiencing issues with option selection

I am currently working on scraping data from a specific website which can be found at the following link: My task involves navigating to the terminal code column and selecting 'General Cargo' Below is the HTML code snippet: <select name="terminal" id ...

Utilizing the .uniq method on capybara xpath selectors to efficiently navigate past Capybara::ElementNotFound exceptions

Currently, I'm developing a JavaScript-enabled screen-scraper using capybara/dsl, selenium webdriver, and the spreadsheet gem. Although I am very close to achieving the desired output, there are two significant issues that have emerged: Firstly, I have ...

Is there a way to crack the Cloudflare turnstile CAPTCHA using Python, Selenium, and the 2Captcha API?

I am attempting to solve the cloudflare turnstile captcha on the website using Python Selenium with the 2captcha API. I followed the method shown on the 2captcha website, like this example solution for solving a cloudflare turnstile captcha: . However, I ...

What sets apart adjusting window size through Options versus using the set_window_size method?

Seeking guidance on adjusting window size in Selenium. Discovered a helpful solution at How to set window size in Selenium Chrome Python rom selenium import webdriver from selenium.webdriver.chrome.options import Options options = Options() options.add_ar ...

It appears that there is a security concern with your current connection while utilizing Selenium.WebDriver version 3.6.0 with Firefox version 56

While working on my tests using Selenium with C#, I encountered a major issue when testing my website with a secure connection (HTTPS). Unfortunately, all the solutions I found on stackoverflow were either outdated or ineffective. I attempted to implement ...

I'm attempting to sign up for Twitch using the Selenium module in Python, but I keep encountering an unexpected error

I am facing the issue indicated in the title. options = Options() options.add_argument("User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36") service = Service(ChromeDriverMa ...

Encountering an issue when trying to choose the start date

When attempting to select the From-Date on "opensource-demo.orangehrmlive.com" Dashboard > Apply leave, I encountered an issue where I was unable to click on the from-date textbox. driver.findElement(By.id("applyleave_txtFromDate").click(); Select secMon ...

Issue encountered: The class 'PHPUnit_Extensions_Selenium2TestCase' was not found in the specified *.php file causing a fatal error

I am very new to Selenium and I am currently trying to configure PHPUnit with Selenium 2 by following a tutorial at https://www.youtube.com/watch?v=zva_GETXimI Here is what I have done so far: 1. Installed PHPUnit using PHAR as per the instructions here: ...

Tips for finding items within a table using Python and Selenium

I am currently utilizing selenium to assist in extracting data from a website that utilizes JavaScript to load its content. To view the link, you can click here: Animal population On the page, there are various selectable fields. Specifically, I am inter ...

What makes Selenium 2.0 unique in not requiring an external Firefox driver like IE and Chrome?

Can someone please help me with two questions I have? 1) I'm curious about why there isn't a Firefox driver [.exe] available for running selenium2.0, like there is for IE and Chrome. 2) Why is it necessary to initialize the IE and Chrome drivers when wor ...

Assistance required for locating elements in Selenium using Css Selector

Hi there, I'm not really a developer. I've got two checkboxes in my table without any IDs. Usually, I can easily work with Selenium when elements have IDs, but in this case, the table was generated using jquery datatables and no automatic ID assignment to ...

Tips for choosing multiple rows from various locations in a table with Selenium WebDriver

I have been experimenting with the following code to retrieve table rows, but I want to specifically select rows that are in various locations within the table. @Test public void testRowSelectionUsingControlKey() { List selectedRows = ...

Is there a way to run specific test cases, such as TC5 and TC10, using TestNG?

Is there a way to execute specific automation test cases out of a list of 10 using TestNG, such as TC5 and TC10? ...

Deleting an interceptor parameter in Selenium Wire with Python

I could really use some assistance. Currently, I am utilizing Selenium Wire to manage the requests from a website and I need to adjust certain settings in these requests. I came across the request_interceptor method which is working perfectly. However, I ...

Error in main thread: The program was unable to find the specified element

Issue encountered in the main thread: org.openqa.selenium.NoSuchElementException: The element being searched for cannot be found: {"method":"css selector","selector":".ui-state-default.ui-state-highlight.ui-state-active"} Encountering an error when using ...

Exploring the Beauty of Selenium and Python by Navigating Links

On a webpage, there are multiple links displayed randomly. The code I've written is set to open the first link in a new tab and perform a function. However, I'm unsure how to handle this if there are more than one link. Is there a way to iterate through th ...

Having trouble locating the element using xpath for selection purposes

Hey, I'm encountering a major challenge while trying to find this element using xpath: class="accountSettingsTextBase_1u09j40-o_O-accountSettingsItemText_10y8axf" aria-current="false" href="/account/signin">Log In I've experimented with: "/ ...

What is the process for using selenium-side-runner to run tests on Firefox browser?

After installing selenium-side-runner on Mac Mojave, I encountered an issue while attempting to execute a test from the command line using a recording from the IDE. The test file is named "myTest.side" and to address this, I created a corresponding "myTest ...

Scraping the web with a webdriver using a for loop

My task involves scraping data from this specific website: this link. The main challenge is to extract content located in the right box of each page until the last item is reached. This means that clicking on the "<이전글" (previous item) or "다음 ...

Having difficulty in choosing an option from a constantly changing drop-down menu

Having trouble clicking and selecting a value from a dynamic drop-down menu? Take a look at the code snippet below: public static void main(String[] args) { // TODO Auto-generated method stub //System.setProperty("webdriver.chrome.driver", "C:\Ch ...

Selenium ChromeDriver encountered an issue loading a resource: net::ERR_CONNECTION_CLOSED

When running acceptance tests with Codeception using WebDriver and a Docker Selenium standalone server, I encountered an error that resulted in the following log message: [Selenium browser Logs] 13:59:52.345 SEVERE - https://ssl.google-analytics.com/ga ...

Is there a way to display all the elements in a list object?

Whenever I run the following code: wait = WebDriverWait(driver, 20) # Adjust the timeout value as needed parent_div = wait.until(EC.visibility_of_all_elements_located((By.CSS_SELECTOR, ".el-table-box"))) print(parent_div) The output I receive i ...

Is there a way to execute the entire test suite for a failed test case in TestNG?

I am looking to rerun the test class that failed along with its failed test cases in order to address any issues with dependent test cases. After trying to use ITestListener and IRetryAnalyzer, I found myself stuck in an infinite loop of failures when usi ...

Guide to managing authentication popups in Chrome using Selenium WebDriver in Java

I'm currently dealing with an authentication pop-up in one of my new Webdriver scripts. While I have a solution that works for Internet Explorer, I'm facing some challenges with Chrome. The approach for IE was straightforward - following the guid ...

capturing picture in the moment with splinter

I am facing an issue with saving images using the `splinter` library in Python. I have a page where images are dynamically generated via JavaScript, and while I can navigate to the image using `splinter`, I am unable to save it successfully. My current co ...

Set up the RefControl extension with the help of the Selenium WebDriver

I have successfully implemented this addon with selenium. However, I am unsure how to adjust the settings of addons in selenium. from selenium.webdriver.firefox.firefox_profile import FirefoxProfile from selenium.webdriver.firefox import webdriver profil ...

While Xpath can be successfully located within Elements and Console, it encounters difficulty when attempting to be located during application execution

I'm currently enhancing my skills with Selenium Webdriver along with ChromeDriver, focusing on XPath. Below is the code snippet that I attempted to run: WebDriver driver; String baseURL = "http://youtube.com"; System.setProperty("webdriver. ...

org.openqa.selenium.WebDriverException: Failed to interpret the response from remote server: <!DOCTYPE html>

After setting up a Selenium standalone Firefox docker container and starting the session on Host port:4545 using command docker run -d -p 4545:4444 --shm-size 2g selenium/standalone-firefox:3.141.59, I verified its functionality by accessing http://localho ...

Unable to click on a checkbox using Chrome WebDriver in Python

I've been working on a script to display only Pikachus on the Singapore Poke Map. The goal is to extract coordinates for each Pikachu and print out the list. Despite trying numerous suggestions I found, I still can't get the checkbox to be set with the lat ...

Why does the 'Click Method' keep throwing a 'Stale Element Exception'?

Why does the Click Method keep returning a "Stale Element Exception"? Sometimes the method will successfully click on the intended link:- public @FindBy(xpath = ".//div[@class='category_menu']//a[text()='Supercars »']") WebElement ...

Executing Selenium tests on Firefox version 15

I am currently attempting to use Selenium 2.5 with Firefox 15.0.1 on Ubuntu 20.04 LTS using python2. Below is the Python script I am trying to run: from selenium import webdriver driver = webdriver.Firefox() However, I encounter the following error messa ...

Can findElement and findElements in WebDriver be impacted by implicit waits?

Do these actions exclusively impact findElement? To clarify, in a scenario where I need to test for an element that isn't present on the page, should I resort to using findElement (even if it may be slow due to implicit waiting) or is there a viable a ...

Selenium webdriver is having difficulty locating the element

Currently attempting to extract data from the designated website: My goal is to: Use a webdriver to simulate changes in amount and duration by adjusting sliders, then scraping this information. However, I'm encountering difficulties as I commence m ...

Troubleshooting Python Selenium Code: Identifying and Correcting Errors

Can someone explain why this snippet of code opens Mozilla twice and doesn't close it after finishing? I'm also a bit confused as to why the login function is within a class instead of being a standalone function. > import unittest from selenium import ...

Inadequate security measures in place for preventing data block automation during tasks performed in the

https://i.stack.imgur.com/bMTRZ.png I implemented the following code in Selenium version 4.16.0, using Chrome version 120.0.6099.217. from selenium.webdriver.edge.service import Service service_obj = Service() driver = webdriver.Chrome(service=service_o ...

Is it possible to incorporate Selenium waits within a while loop in the code?

Currently, I am developing a script that runs continuously and should halt once it detects the presence of text in a specific element on the webpage. Despite my search through the Selenium Python documentation, I have not found any guidance on achieving th ...

Closing the privacy acceptance popup in selenium with Python

I am attempting to retrieve information from the following website: Upon opening the page in Selenium, a "Updated Privacy Policy" window pops up. I have tried using a wait function on the modal and clicking on it, but it keeps timing out. Below is the cod ...

What is the best way to retrieve the php $_SESSION variable within Mink (Behat) framework?

My current challenge involves writing code to log in a user, which is necessary for the scenario. I want to streamline this process by avoiding the need for the browser to actually visit the login page, fill in fields, and submit the form repeatedly. Inste ...

Access approval needed for Browserstack Remote Session Settings

I am switching from using DesiredCapabilities to RemoteSessionSettings, but I'm encountering authentication issues with BrowserStack. Is there a way for me to successfully utilize RemoteSessionSettings for parallel testing in BrowserStack? Here is an exa ...

Choosing elements with Selenium on Instagram

Currently, I'm in the process of developing an Instagram bot that will automatically like images by identifying the 'heart element' on the webpage and clicking on it. Upon inspection, I noticed that the structure of the element looked like ...

Here are the steps to resolve the error message: "selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element"

I am currently in the process of learning Selenium. My focus is on creating a script that can add multiple items to a shopping cart. Interestingly, when I removed the class from my script, it allowed me to successfully add an item to the cart. However, on ...

What are the variances in using xpath with selenium webdriver?

WebElement element4=driver.findElement(By.xpath("/html/body/div/table/tbody/tr[2]/td[2]/div/div/div/div[4]/ul/li[3]/a")); WebElement element3=driver.findElement(By.xpath("//*[@id='nav_cat_3']")); When retrieving xpaths using firebug, both xpaths are bein ...

Employing a proxy server in conjunction with selenium and ruby

I'm facing an issue with getting selenium to make requests through a proxy server, as it doesn't seem to be working properly. Although this code gets a response, it's not utilizing the proxy settings: Selenium::WebDriver.logger.level = :info proxy = Sele ...

Encountering an Issue with File Upload Functionality in Jmeter Using Web Driver

Click here for the image Issue with Method Invocation sendKeys: encountered at Line 31 of file inline evaluation. Error message: "ElementNotInteractableException: element not interactable." Seeking assistance from anyone familiar with this issue. ...

Finding Selenium SafariDriver Logs on Mac OSX

Has anyone had experience utilizing the Webdriver logs from Safaridriver on OSX? I am curious because despite configuring Safaridriver as shown below, I am unable to locate the logs in the specified directories such as '/User/${USER}', '/tmp ...

A guide on testing click-to-call browser functionality using Selenium WebDriver

On my webpage, there are 1300 numbers and I need to ensure that when I click on one of them, a browser popup window opens. From this popup, I will capture some details to verify the test is successful. I am looking for guidance on how to verify this popup ...

Issue with updating Selenium ChromeDriverManager through a proxy network

I am trying to use selenium and Chrome with Python to access a website. Below is a snippet of my code: from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.service import Service # PROXY='h ...

The Selenium test case script using JUnit is malfunctioning on Eclipse when attempting to run it with the Firefox driver

I have attempted to run my program using various versions of Firefox (45, 48, 49, and 50) with no success. I have also specified the path for the Gecko driver (64 bit) within my code, but unfortunately, the Firefox browser fails to open when I execute the ...

Having difficulty choosing an option from the dropdown menu using Selenium WebDriver

I am currently using Selenium Webdriver version 2.41 along with Chrome version 68. My goal is to select an item from a dropdown list: <div id="loc_placeholder" class="jLocPlaceholder" style="">All locations</div> <select id="location_ ...

Are there any available scripts written in Selenium using Python for capturing screen recordings?

Is there a way to record the screen using selenium in Python? I have searched for solutions, but all I find are examples in Java and only for capturing screenshots. If anyone knows of a script or method for recording the screen in Python, please share it ...

Selenium: a systematic approach to creating test scenarios

Can you share your approach to developing test cases for Selenium 2 / webdriver? In JUnit, developers typically write tests before implementing functionality and continuously run them against the code while making modifications. Is there a more interactive ...

Executing Specific Test First Before All Others Using Specific Parameters - WDIO and Selenium

I'm currently working with WebDriverIO and I have a specific requirement: Execute a single test before any other tests (createNewUsers) Utilize certain capabilities (proxy settings) for this initial test Afterwards, switch to using default capabilit ...

Is there a potential security measure that can deactivate automation processes?

I'm currently developing a Python script using the Selenium Chrome Webdriver to automate tasks on this specific Swedish website: . My main focus is automating the login process, however I have encountered some persistent errors such as: selenium.common.ex ...

Can a custom webdriver be successfully registered within a Selenium grid environment?

I have developed a unique webdriver specifically for a customized browser by extending RemoteWebDriver. It functions well when used independently by creating an instance of the driver. However, my goal is to integrate this custom web driver with Selenium ...

Ways to securely store passwords in Selenium WebDriver using C#

Currently, I am working on enhancing our website automation testing script. We have a team of part-time staff members whom we rely on to run this script in order to monitor all our web services. However, there is a security concern that arises before dele ...

Is there a way to display a list of dropdown menu options using Selenium with Python?

I am currently attempting to utilize Selenium Python and its PhantomJS function in order to print out all the items from the first drop-down menu on this particular page (). Unfortunately, I keep encountering a No Attribute error message. If anyone could ...

I need to generate a random number and then utilize it in a different class to produce unique random names

I'm facing a challenge with converting an integer to a string in the code below. Additionally, I would like to know how I can utilize it in another class. public int RandomNumber(int min, int max) { Random r = new Random(); return r.nextInt(( ...

Selenium is having difficulty clicking on a table row, even though it can be done manually

On my webpage, a table is populated dynamically through an API call. Each row in the finalized table is structured as follows: <tr class="ant-table-row ant-table-row-level-0" data-row-key="0"> <td class="">Value1</td> <td class="" ...

Execute a bash command using Appium

I have a bash script that deletes my temporary files after each test, ensuring a clean slate for the next one. Is there a way to run bash commands or execute a bash script using Appium at the end of every test? Currently, our tests are written in C# - id ...

Is there a way to automate the uploading of captcha images to this solving service using Python?

Currently, I am working on a Python program with the goal of solving captchas on a website. My plan is to integrate 2captcha into the solution. Using Selenium, I have managed to write a Python script that fulfills all required tasks except for solving the ...

Handling alert, confirm, and popup events in C# using Selenium

Despite extensive research, I have yet to find a solution that addresses the specific issue at hand. Our team is utilizing Selenium with C#. The main problem we are facing is our inability to control alerts, which may be due to their quick disappearance: ...