Questions tagged [selenium]

Selenium, a widely adopted open-source tool, holds immense popularity in the automation of web browsers. In addition to using this tag, ensure that you incorporate appropriate tags for the particular components you utilize, such as selenium-webdriver for language bindings, selenium-ide, selenium-grid, and more.

Exploring the basics of Safari 13 authorization through webdriver

Is there a way to fill the basic authorization popup in Safari 13 during an automated session? I need to log in to a website that requires this type of login process. Even a manual solution would be helpful. Can anyone provide guidance on how to achieve th ...

Finding the li element within the ul container

Is there a way to determine the count of li elements that have been created within a ul element with a specific id? Below is an example of the structure: <ul id="someid"> <li class="someclass"></li> <li class="someclass"></l ...

Selenium cannot locate element by its id

Recently, I started using selenium web-driver to automate my tasks. My main goal is to use it for logging in and navigating/scraping data. public static void main(String[] args) { java.util.logging.Logger.getLogger("com.gargoylesoftware.htmlunit").s ...

The type 'WebDriver' from Selenium cannot be resolved, and the type 'FirefoxDriver' cannot be resolved as well. This is not a duplicate issue

My first experience using this forum has been quite frustrating. My questions keep getting deleted as duplicates, even though the suggested solutions are not working for me. The initial problem was caused by incorrect jars, but I believe I have the correct ...

Unable to close Chrome driver following completion of capybara test

Currently, I am utilizing capybara 2.1.0 along with the default selenium webdriver, minitest, and test::unit. For certain tests that require the use of the .hover method, I switch to the Chrome webdriver. However, after running these tests using Chrome, I ...

An error occurred when trying to send an HTTP request to the remote WebDriver server for a URL, resulting in a null response being thrown

https://i.stack.imgur.com/s4RyZ.png Encountering an error when attempting to use EdgeDriver with Selenium. While ChromeDriver runs smoothly, I am required to use Edge for this project. Some sources suggest that the WebDriver version needs to match the Win ...

Issue with ChromeDriver compatibility in Selenium version 3.141.59

My current setup involves Selenium for Java version 3.141.59, and I'm encountering an issue where the code cannot initiate a chromium instance but instead throws the following exception: The nested exception is org.openqa.selenium.SessionNotCreatedExcep ...

The issue with Python Selenium driver.get() function not functioning properly when used within a for loop

Here is some code that logs into a YouTube account and then visits a few YouTube videos. The problem arises in the following scenarios: If I use a direct link like this, it works fine driver.get('https://www.youtube.com/watch?v=FFDDN1C1MEQ') ...

Selenium Python is having trouble finding the element

While utilizing Selenium in Python, I encountered a challenge with inputting information into the expiration date and CVV fields. These fields are located within iframes, and although I successfully entered the credit card number, the other fields remained ...

Trying to execute Python scripts in Selenium IDE as a test suite

I'm facing a couple of issues when trying to run multiple Python test scripts exported by the Selenium IDE Python Remote Control plugin formatter. 1) The browser window automatically closes after a python script is completed. I am using Firefox for my tes ...

Tips for clearing Nightwatch session storage efficiently

To ensure the pop-up functionality was working properly, I had to reset the browser's session storage. By doing this, the pop-up will reappear. Is there a way to clear the page's Session Storage in Nightwatch? ...

Python script using Selenium to only print elements in an HTML page that have a specific class value and print only certain elements based on

I am currently developing a script to automatically test all the free proxies available on The website contains a comprehensive list of all available proxies, and I have successfully made my script extract and display them. However, I only want to display ...

Retrieve the first span element using Selenium

I am struggling to extract the content from the first span that contains the text Extract this text. Here is what I have tried so far: element.find_element_by_css_selector(".moreContent span:nth-child(1)").text.strip('"') Unfortunately, this code is not ...

Encountering a ClassCast Exception for Actions.movetoElement with Selenium version 3.14.0+ post selenium upgrade

After updating selenium to the newest version 3.14.0, I encountered a class cast exception with the following method: new Actions(driver).moveToElement(element).click().build().perform(); The error message reads: java.lang.ClassCastException: com.prahs.u ...

Python: Techniques for zooming out from a webpage with selenium

In an attempt to zoom out to 25% using my Python Selenium program, I want to go from this: https://i.stack.imgur.com/6hPjF.png to this: https://i.stack.imgur.com/4LFMj.png When zoomed out to 25%, all the elements that should be visible while scrolling d ...

UnhandledAlertException: sudden pop-up alert detected: {Alert message : Action saved successfully.}

While using the Chrome driver in Selenium, I encountered an error when handling an alert pop up. Exception in thread "main" org.openqa.selenium.UnhandledAlertException: unexpected alert open: {Alert text : Save successfully.} Situation: The error occurs ...

Automate text input using Selenium and Python: a guide to filling in a Wikipedia textarea

I'm seeking help with Selenium - specifically, how to input text into a textarea (wiki textarea). The original HTML is provided below. Your assistance in figuring this out would be greatly appreciated. Thank you! <textarea class="textarea long-f ...

Tips on analyzing two lists that have unique identifiers yet contain identical information

I am dealing with 2 lists that have the same content but reference different names. There is a table I can download with an 'Export' button, which saves a CSV file to my local system. I am using Selenium to retrieve the table data and I have att ...

What is the process for recreating a thread with different parameters?

I am working on a multithreading program that sends emails to my clients. However, I am facing some issues with the threads in my code - they only close the window of Firefox and do not continue the desired actions. I am looking to create an algorithm wher ...

Selenium is unable to identify a clickable button in this scenario

<html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Unique Phantom Wallet Title</title> <style> @font-face { font-family: Ci ...

When attempting to download images using the src attribute in Python, users may find that

My script is somewhat functional, but the saved files are coming out empty. Any suggestions on what might be causing this issue? I apologize for the excess of unused imports at the beginning! I've tried numerous approaches to resolve this problem. Here, ...

Which UI testing tool in the .NET framework includes a built-in browser for quicker test execution?

Hey there! I have a vague memory of either selenium or watin having their own browser built-in to speed up test runs compared to using the regular browsers like IE or Firefox. Can someone point me in the right direction for more information or documentatio ...

What is the best way to locate the XPath expression for this specific website?

I am looking to extract data from this particular website. With a collection of numerous resumes at my disposal, my objective is to gather the skill sets mentioned in each one. Here is the webpage link for reference: https://i.stack.imgur.com/lBoym.png ...

Python crawling loop for web scraping

I'm interested in retrieving all the reviews from the Google Play Store using Python, but I need to click on the "view more" buttons. I believe a loop might be necessary for this task. import time from selenium import webdriver from selenium.webdriver.c ...

Troubleshooting Extent Report Issues in Parallel Testing

Here is the Reporting code I am working with: public class Reporting { private ExtentHtmlReporter extentHtmlReporter; private static ThreadLocal<ExtentReports> extentReports = new ThreadLocal<>(); private static ThreadLocal<Ext ...

Can Selenium in Python be used to access Chrome's inspect element feature?

Trying to access the inspect element feature in a Chrome browser for a project, but encountering difficulties. Attempting to use F12 or Control+Shift+i does not yield any results: action = ActionChains(driver) action.send_keys(Keys.F12) action.perform() A ...

Executing tests in parallel using FlatSpec, Selenium DSL, and Spring framework

While working with Scalatest, FlatSpec, Spring, Selenium DSL and BeforeAndAfterAll, I noticed that one of these components is interfering with the proper functionality of ParallelTestExecution. Here is what happens when running a class with two tests: On ...

Selenium - Comparing text_to_be_present_in_element with text_to_be_present_in_element_value

Would you be able to provide an example in Python that demonstrates the contrast between text_to_be_present_in_element and text_to_be_present_in_element_value? I came across this link which attempts to clarify how text_to_be_present_in_element functions, ...

The requested [url] session is currently unavailable and does not appear in the last 1000 terminated sessions. Looking for a solution?

Every time I attempt to initiate php behat.phar The WebDriver firefox window opens and my feature test fails at the first step, skipping the rest. The error message I receive is as follows: ... Given I am on "first.php" #FeatureContext::visit() Sess ...

Unable to Run Test Case using TestNG

import org.testng.annotations.Test; import org.testng.annotations.BeforeMethod; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.AfterMethod; public clas ...

Error in HTTPURLConnection displaying inaccurate status

I have been utilizing Selenium Webdriver to validate the functionality of every link on my website or CMS by checking their HTTP status. The approach I am taking involves using the HttpURLConnection class within Selenium Webdriver. Below is the code snippe ...

There are no attributes currently present in the Document Object Model for the Tooltip

Can anyone assist me with an issue I'm having regarding tooltips? Some tooltips are missing certain attributes like title, and I need help identifying the tooltip shown in the image below. Just to note, there is no attribute related to the tooltip provide ...

Steps for retrieving the attribute values of <i> tags enclosed within a designated <div> element

Currently, I am extracting data from a website where I encounter a recurring pattern with a varying number of values. For example, an instance of this pattern is shown below: <div class="lang"> <i class="flag fr" qtip-tooltip= ...

Selenium's Firefox driver - A powerful tool for web

Is there a place to download the Firefox driver for Selenium? I have checked this link, but I couldn't find the driver file for download: https://code.google.com/p/selenium/wiki/FirefoxDriver NOTE: I already have Selenium Webdriver IDE for Firefox, ...

Tips for utilizing selenium IDE for creating an HTML report

Currently working on a project developed using GWT, I have been utilizing Selenium IDE to record the steps taken on each page. I am now wondering how I can generate an HTML report after running the test suite in Selenium IDE. Appreciate any help or guida ...

Stop child classes from running inherited test methods

I currently have two functional test classes set up for testing. class VehicleTest(unittest.TestCase): def setUp(self): self.browser = webdriver.Firefox() def test_math(self): self.assertEqual(1+1, 2) class VehicleTestCa ...

"An Inquiry into RSpec: What causes the MethodError for undefined method in my code, while this How-to guide

After finding a solution to my previous issue, it seems that this approach could provide the necessary help in creating a test that iterates through multiple elements using RSpec. However, I am puzzled as to why the following code does not work within my ...

Placing a comma following each element in soup.find_all()

After finding all 'tr' elements in the soup variable, I discovered: [<tr data-row="0"><th class="left " csk="Murray,Jamal" data-append- csv="murraja01" data-stat="player" scope="row"><a href="/players/m/murraja01.html">Jama ...

Is it recommended to reset and start a fresh WebDriver session for each negative test in Selenium?

Each time I run a negative test, I make sure to close and reopen my driver. For instance, if the login test fails (meaning the login was successful), I restart the driver to begin fresh on the login page. Is this the recommended approach? I've considered ...

Using Python and Selenium to Retrieve and Load All Website Comments

I am trying to extract around 7000 comments from this link. The challenge is that the website only displays 10 comments at a time, so I am using Selenium in Python to load all comments and then parse them with BeautifulSoup. Here is the HTML segment of th ...

Every time I try to run my scripts on PyCharm using Jenkins, I keep receiving a notification to

While attempting to execute automated tests on the cloud version of Jenkins, I encountered the following error: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-0739wibs/cryptograph ...

Is there a way to adjust the typing speed of the Chrome driver in Selenium?

I'm working on a UI test that utilizes the Selenium Chrome driver. I would like to adjust the form filling speed to be slower, but my attempts to find a solution through Google have been unsuccessful. Does anyone happen to know how this can be accomp ...

Upon loading a webpage using selenium, it navigates to the end but fails to retrieve all elements housed within the div

Looking to scrape all the product links from this website: . The page only loads 30 out of 100 products initially, and the rest load when clicking somewhere on the page. How can I retrieve all the product links? Any help is appreciated! from selenium im ...

Selenium performs typically during debugging, however it encounters an issue when attempting to run the click function

I've tried multiple solutions, but none of them seem to work for me. Here's my code snippet: driver = webdriver.PhantomJS() driver.get('https://baijia.baidu.com') wait = WebDriverWait(driver,10) wait.until(EC.element_to_be_clickable((By.ID, 'getMoreArticl ...

Creating and Managing Excel Files using Java

package demo; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import java.io.FileInputStream; import java.io.FileOutputStream; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.xssf.usermodel.XS ...

Having trouble with selecting multiple checkboxes with Selenium Webdriver

My goal is to select all 50 items on each page. Here's the code I'm using: wait = WebDriverWait(browser, 10) element = wait.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="results-list-delivery-toolbar"]/div/ul[1]/li[4]/ul/li[3]/button'))) browser ...

Python - Troubleshooting a Timeout Exception Error in Selenium Webdriver

My objective is to extract movie genres from the IMDB website through a different platform. The main page I am working with is: driver.get("https://sfy.ru/scripts") # main website Please note that you may encounter a "certificate is not v ...

Selenium GUI tests are not showing up when running in Jenkins on a Windows 7 machine

I am encountering an issue where when I run my Selenium test (mvn test) from Jenkins on a Windows system, I can only see the console output and not the actual browsers being opened. Is there a way to configure Jenkins so that I can view the browsers runn ...

Selenium IDE: Creating a new variable by extracting a text string from an existing one

I have a scenario where I need to extract a specific text string from a variable and use it in a new command on Selenium IDE. The test suite snippet is structured as follows - storeAttribute | link=EMQ Welcome Page@href | window echo | ${window} The ech ...

What are some strategies for navigating through Selenium authentication during testing?

I am trying to test an authentication form using Selenium, but I want to avoid including user credentials in the URL. Is there a way to achieve this with Selenium? Here is an example of an authorization form: auth form example ...

Error: The file or directory 'geckodriver' cannot be found for a basic Python Selenium program

I am currently experimenting with a basic selenium example on a Linux system: from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Firefox() driver.get("something") But I encountered an error: FileNotFoundEr ...

Failed to find the element using Selenium

Can anyone help me find the username input section on the following website: ? I've included the code snippet I used below: from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import ...

A guide on setting a default download location in Selenium

Is there a way to set a default download path in Selenium when using headless chrome in Docker? # docker-compose.yml services: chrome: container_name: chrome image: selenium/standalone-chrome-debug:3.9.1-actinium ports: - 4444:4444 Below ...

Java selenium handling a multiple selection box with aria-activedescendant functionality

I am looking to automate the process of selecting an item from a dropdown menu using Selenium. The HTML code for the dropdown can be seen below, with each component identified using Firebug. <input type="text" autocomplete="off" autocorrect="off" autoc ...

Navigating infinite scroll pages with scrapy and selenium: a comprehensive guide

Struggling with using scrapy +selenium to extract data from a webpage that loads content dynamically as we scroll down? Take a look at the code snippet below where I encounter an issue with getting the page source and end up stuck in a loop. import scrap ...

Is there a way to use Selenium to perform testing on a web UI that generates XML content instead of HTML?

Utilizing Selenium for testing my Perl cgi script has been successful overall, but I've encountered a unique issue in one particular test case. In this scenario, the cgi script returns XML content to the web browser instead of the expected HTML conten ...

Is it possible to use Selenium for testing mobile web applications?

Seeking guidance on how to conduct automated testing using Selenium or another Ruby-aware tool for Android devices (Android Browser) and iPhone/iPad (Safari for iOS). Any recommendations or strategies would be appreciated. ...

Saving a targeted image with C# Selenium Webdriver no matter its whereabouts

There are many examples of how to save an image by taking a screenshot, but this method has a major flaw. The issue is that the screenshot only captures what is visible on the page at that moment. So, if there is an image at the bottom of the page and you ...

Adding a log file to an Azure DevOps Test Execution

I have been encountering difficulties when trying to upload the log file generated from my automated tests in the Azure Release pipeline. My automated UI tests are conducted using selenium and MSTest. Initially, I believed that I could attach the file in t ...

When the enter key is pressed and a text is entered on the same line or under a specific condition

Is it possible to input text and press the enter key using a single statement? I attempted to separate the steps of inputting text and pressing the enter key. Can this be achieved in just one statement? WebElement department = driver.findElement(By.xpat ...

Python web scraping with selenium

Looking to extract all href contents from the "news" class (URL provided in the code), I attempted this script but encountered issues... Here is the code snippet: from bs4 import BeautifulSoup from selenium import webdriver Base_url = "http://www.thehin ...

"Selenium encounters a NoSuchElementException when trying to interact with a dropdown menu located inside an

I have been trying to access the voter list database through this link Unfortunately, I am unable to retrieve the first drop-down menu. I am currently using selenium version 3.14 This is the code that I have written: user_agent = "Mozilla/5.0 (X11; ...

Is it possible to log "System Generated Log" to a log file with log4j2x in Selenium using TestNG in JAVA?

The System Generated Log Appears as Follows: 15:38:09,447 DEBUG RequestAddCookies:122 - CookieSpec selected: default 15:38:09,456 DEBUG RequestAuthCache:76 - Auth cache not set in the context 15:38:09,459 DEBUG PoolingHttpClientConnectionManager:249 - Conn ...

Protractor Error: Internet Explorer Launch Error Due to Inconsistent Protected Mode Settings Across Zones

I need help troubleshooting my protractor launch. Here is the code snippet I am currently using: conf.js containing the following: // Sample configuration file. exports.config = { // Address of running selenium server. seleniumAddress: 'http://localho ...

Having difficulty retrieving the city name from the website (goibibo.com)

New to using selenium, I am currently working on automating the website goibibo.com. My goal is to input "Chennai" into the "From" textbox using xpath, which prompts some suggestions. From those suggestions, I intend to select "Chennai". Utilizing Seleniu ...

Assistance Needed with Python XPath

Newbie to Python/Selenium. Seeking assistance in locating code 1203 within the third div, and then identifying the corresponding input checkbox. Currently struggling with the code provided below. Your support would be greatly appreciated. driver.find_ele ...

Guide to using Python for automating the process of clicking on an email link to retrieve data

I'm attempting to access a specific email from my inbox and need to click on the 'Click here' hyperlink in order to download an Excel file onto my laptop. Here's the code I've been working with: import smtplib import time impo ...

Guide on deactivating the HTML drawer layout on a website with Selenium using Java

I am currently working on automating a website and I have encountered a challenge with a drawer Menu Panel. My goal is to open the menu, verify certain elements within it, and then close or hide it. However, I am facing difficulty in closing/hiding this d ...

Having trouble with Selenium Chromedriver failing to download to the designated folder

I am currently attempting to retrieve some data from the FanGraphs Leaderboards using the selenium library. Initially, I was using Firefox for this task, but due to Chrome being faster, I decided to make the switch. While things worked smoothly with Firefo ...

Convert a string with spaces to an integer in Python

Is there a way to eliminate the space in <span id="balance">1 268</span> and convert it to an integer value? Here is the code snippet: Balance_afterWinORLoseBet.replace(" ", "") Balance_afterWinORLoseBet = int(balance_new.text) #Creat ...

The dilemma surrounding implementing the Page Object Model in C# using Selenium is causing uncertainty

I have successfully written code that navigates to a specific URL and changes the country and currency. Now, I am looking to refactor my code for better organization and easier maintenance. Although I haven't used the page object model before, I have been ...

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 ...

Having difficulty selecting an element with Selenium in Java

I am encountering difficulties with retrieving and utilizing a Select element using @FindBy. Here is the markup: <td> <felt [control]="kontactTypeFC" [classes]="'hb-distNone'"> <label for="contactTypes" class="hb-label"& ...

Appium encountered an error on iOS with the message: "NSCocoaErrorDomain Error Code 260: The file named 'WebDriverAgentRunner-Runner.app' cannot be opened as it does not exist"

While running appium on a real iPhone, I encountered the following error message. Despite searching for a solution, I have not been able to resolve it yet. [XCUITest] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appiu ...

The Selenium Internet Explorer driver is having difficulty locating the accurate webpage source

Currently, I am faced with a challenge on my login page that redirects to a different page where I need to extract data from an element using Selenium. While running the code locally in Eclipse with the IE driver, I encountered an issue where the page sour ...