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.

Trouble navigating to the 'current active tab' in Chrome with WebDriver using Java

I am facing difficulty switching to the 'current active tab' in Chrome using WebDriver. Despite trying multiple approaches, I have been unsuccessful so far. Navigating to a different tab is possible, but determining which one is the current act ...

The error message "AttributeError: 'module' does not contain a 'document' attribute" indicates that the specified module does not have a

I'm trying to use Python (2.7.10) and Selenium to input a username and password, but I keep encountering the following error. Can anyone help me fix it? CODE:- from selenium import webdriver import selenium driver = webdriver.Chrome("/Users/username/Down ...

Steps for implementing a helper class as a single instance within my base page model

I have been working on creating a calendar picker helper class instance in my base page model to enable all subsequent page models inheriting from the base page to access it. Below is the code for my helper class: class CalendarHelper : BasePage { pub ...

Creating a Test Data List for Selenium functional testing with JAVA

I am currently in the process of setting up test data to validate the text displayed using selenium. I am facing an issue on how to effectively verify content with selenium. Can you offer some suggestions on how to accomplish this and how to structure th ...

Unable to retrieve the text content within a span element using Python Selenium

I am currently working on a Python project with the objective of extracting data from an estate portal. My code is written in Python and I am utilizing the Selenium package for web scraping. The main challenge I am facing is when trying to extract text fro ...

What are the problems with Internet Explorer in Selenium WebDriver?

Currently dealing with a mouse-over issue in IE while using webdriver code. The functionality works smoothly in Chrome and Firefox, however, the problem arises only in IE. How can I resolve this? Initially focusing on an element and then clicking on a li ...

A guide on utilizing WebDriverWait in Selenium to retrieve the value of the "style" attribute from an element

There is a specific time when the style changes to "display: block". I need to wait for this change before continuing. <div class="dialog transportxs pre_render" id="dialog_transport" style="z-index: 3; display: block;"> ...

Utilizing Python with Selenium WebDriver to choose options from a concealed dropdown menu using jQuery

I am having trouble selecting options from a hidden dropdown box. The website I am trying to automate is www.geforce.com/drivers. Specifically, I need to automate the 'manual driver search' feature on that page. I have attempted to select option ...

Using Java's get() and getAttribute(), replace Selenium in C# for enhanced automation

Embarking on automation tasks in Selenium using Java, but now venturing into C# with selenium. Seeking guidance on how to translate the following Java logic into C# Visual Studio: Int count = driver.findelements(By.Name("radiobutton")).size(); For(int ...

C# Extent Reports are not generating the HTML report file while running a test

I am exploring how to implement ExtentReports in Visual Studio C#. After running a test case, the html report file is not being created. I have checked my code but cannot identify the issue. I believe the path to my reports folder is accurate. I have set ...

Encountering a problem while trying to log into Instagram with selenium, receiving the error message "We had trouble logging you in to Instagram."

I have been working on a code to scrape Instagram, search, and analyze posts and likes. My bot was functioning perfectly fine until yesterday when it suddenly stopped being able to log in. I've tried various troubleshooting methods: Logging out from my p ...

Searching for the #document element using Python with Selenium WebDriver

While working with Python's Selenium Webdriver, I encountered a challenge when trying to access elements within an #document tag using the following HTML code. I attempted both driver.find_element_by_xpath("html/body/div[@id='frame']/ifram ...

I'm attempting to set up an automated registration process, but I'm hitting a roadblock with solving

Currently, I am facing a challenge in automating the registration and login process on a website that implements reCAPTCHA for both actions. Despite using 2captcha to solve the CAPTCHAs, the 'create my account' button remains disabled until manual interven ...

Automate the process of logging into websites by utilizing selenium webdriver technology

Having trouble logging in to a website using selenium webdriver and excel VBA, specifically getting stuck at the log in page Below is the code being used: Dim bot As New WebDriver bot.Start "chrome", "myurl" bot.Get "/" 'select from drop down bot.FindE ...

Can you explain the meaning of arguments[0] and arguments[1] in relation to the executeScript method within the JavascriptExecutor interface in Selenium WebDriver?

When utilizing the executeScript() method from the JavascriptExecutor interface in Selenium WebDriver, what do arguments[0] and arguments[1] signify? Additionally, what is the function of arguments[0] in the following code snippet. javaScriptExecutor.ex ...

Steps for selecting a specific checkbox

I need to interact with the "Select page" checkbox located in the drop-down menu labeled as "All". Here is the HTML code: <ul class="list-unstyled"> <li> <input id="selectAllTop" name="selectAllCheckBox" attr-sel="All" type="ch ...

Unable to cycle through various categories by clicking in order to navigate to the desired page

After creating a Python script using Selenium to click through various categories on a website and reach the target page, I encountered an issue. The script works once but throws a 'stale element' error when trying to repeat the process. How can I address ...

Finding the precise XPath for a specific column title with C# and the Selenium WebDriver: A step-by-step guide

My dilemma is with the HTML snippet below, which I'm attempting to locate using XPath. Despite my efforts, the following code doesn't seem to be functioning as expected: <label class="ms-Label headerText-269" title="Reference Id ...

Exporting table data to a CSV file using Selenium and Python

My goal is to automate the process of extracting my transcript data and saving it to a CSV file using Python with Selenium. I've managed to automate reaching the table page, however, I am facing an issue where only the first row of the table is displayed a ...

When attempting to close the current window in Python, Windows Handling automatically shuts down the entire browser

Currently, I am using Windows handling to open the map directions in a new window. After the new window opens, I close it and continue with the remaining work in the code. However, instead of just closing the child window, the whole browser is being closed ...

What is the best way to create a Protractor expected condition that verifies the presence of a specific CSS class?

After clicking on the button with the id 'public1', the class goes from ng-pristine to ng-dirty. Here's an example: <input id="public1" class="tile-checkbox ng-valid ng-dirty"> Some Text</input> I am looking for a way to write ...

Finding a web element by both its class name and a specific attribute name simultaneously

I'm working with Selenium in Python and am trying to find the element below: <div id="coption5" class="copt" style="display: block;"> Is there a way for me to locate this element using both the class name 'copt' and the attribute value "display: bl ...

Skip a single test from a suite in Firefox using Protractor automation framework

I have a collection of tests in my tests folder, all named with the convention ending in spec.js. By using the */spec.js option in the Config file, I am able to run all tests seamlessly. However, I encountered an issue where I needed to skip running a spe ...

Guide to creating a new browser tab with Selenium WebDriver in Java

Is there a way to launch a new tab within the current Firefox browser using Selenium WebDriver (also known as Selenium 2) in Java? ...

Guide on utilizing sendkeys for interacting with child windows in Salesforce with Selenium WebDriver

How can I use the sendkeys method on a search textbox located in a child window shown in these screenshots? I have successfully identified the URL and title of the child window, however, whenever I attempt to perform click or sendkeys actions in the child ...

Having issues with Chrome Driver timing out after 60 seconds despite using the --no-options flag

My automated task takes a long time to run and sometimes the webpage doesn't fully load for over a minute. I have attempted to set the default timeout in two different ways, but both methods are not working as expected. The error of default timeout af ...

Steps to select a radio button according to the provided HTML code

Incorporating the code snippet below as a reference, I am attempting to implement functionality for a radio button. <input id="checkmo" class="radio" type="radio" data-bind="attr: {'id':getCode()}, value: getCode(), checked: isChecked, click: ...

"Encountering a System.NullReferenceException while attempting to read browser logs using Selenium

Currently, I am using C#, selenium and chromeWebDriver. However, I am encountering an issue when attempting to access the browser console log file with selenium. The error message I receive is: System.NullReferenceException: 'Object reference not set to ...

Setting up Geb 2.0 in IntelliJ: A Step-by-Step Guide for Run/Debug Configurations

I've been exploring Geb 2.0 at http://gebish.org/ and I recently downloaded the Gradle sample from https://github.com/geb/geb-example-gradle. Everything is running smoothly on my machine with various browsers like Chrome, Firefox, and ChromeHeadless. ...

Selenium specifically targets and interacts with the immediate child elements of a WebElement

Is there a way to select only the direct children of a WebElement using cssSelector? webElement.findElements(By.cssSelector("> li"); I want to specifically target the immediate children of an element. Although I am familiar with the css selector "par ...

Creating a Stealthy Presence for Headless Chrome in Python

I'm currently exploring methods to make Chrome headless undetectable, following a specific guide I found. The challenge lies in the fact that the guide relies heavily on Javascript and executing scripts via the command prompt. My goal is to develop an exe ...

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

Using Selenium with Python to log in via a pop-up interface

Currently, I am attempting to log into a certain website using Python 3's selenium webdriver. To start the login process, I first have to click on the "Inloggen" button. Following that, I need to enter my username and password before clicking on the new "I ...

Is it possible to use Selenium Webdriver in VBA to interact with a button located within a frame?

I have created an automation script for a webpage that contains frames. In order to complete certain tasks, I need to navigate through multiple menu links before returning to the main content. This automation is executed using Access-VBA. Below is a snippe ...

Having trouble retrieving the value from the XML file when the key is passed as a parameter

Latest QAF Version 2.1.13 along with 2.1.14-RC1 The XML file contains the following test data - <registration> <existingdata> <title>Mr</title> <firstname>Narendra</firstname> <lastnam ...

Chromedriver 80 causing StaleElementReferenceException with Selenium

After the Chromedriver 80 update, the following code that used to work is now causing a StaleElementReferenceException when the element is present in the DOM: public static void WaitUntilElementNotExists(string clase) { Instance.Manage().Timeouts(). ...

Unable to Access Browser Page

After printing out the URL in the console, I encountered an issue while trying to retrieve it using browser.get(). The error message displayed is as follows: Failed: Parameter 'url' must be a string, not object. Failed: Parameter 'url' must be a string, ...

What steps can you take to determine the cause of a failed driver.save_screenshot function

Based on information from the Python Selenium documentation, when driver.save_screenshot encounters an IOError, it will return False. How can I determine what caused the save to fail? Here's a sample of code to illustrate: if driver.save_screenshot(s ...

ChromeDriverError: Unable to create session - This version of ChromeDriver is only compatible with Chrome version 116

Error: Unable to create session. The current version of ChromeDriver is only compatible with Chrome version 81. WebDriverManagerException: chromedriver 113.0.5672.63 for WIN64 cannot be located at ...

Selenium in Python: A Guide to Clicking on Web Elements

Program: Python + Selenium Situation: I am currently working on automating the login process for Facebook using a script written in Python with Selenium. My goal is to access my Facebook home page through automation. Problem: As a beginner, I am struggli ...

Demonstrating the use of multi-level headers in a table using Selenium WebDriver

What is the best approach in Selenium WebDriver when dealing with a web table that has multiple levels of headers, where child headers are also the same? SampleImage <table> <col> <colgroup span="2"></colgroup> <colgroup ...

Selenium's click() function is functioning properly, however, the submit() function is not working

During my Selinium Webdriver tests, I have encountered a puzzling issue where I am unable to submit a form by using the submit() method on the elements within the form. However, I can successfully submit the form by calling click() on the submit button. To ...

The Selector object cannot be serialized into JSON format

Currently, I'm facing the challenge of scraping a dynamic website which requires the use of Selenium. The specific links that I'm interested in scraping only become visible when clicked on. These links are generated by jQuery, and there is no hr ...

Adding Retrieved Information to DataFrame in Python Using Selenium

I'm currently learning about web scraping and practicing on the Eat24 website (Yelp's platform). While I have been successful in extracting basic data from Yelp, I am encountering a challenge when trying to append this data to a dataframe. Below is the cod ...

Experiencing an intermittent issue with the "JavascriptException" error while using Selenium

Hey, I've encountered something really strange - I'm receiving an error that says "Exception has occurred: JavascriptException / Message: javascript error: this.each is not a function" on a specific line in my code: waiting.until(EC.visibility_of_element_l ...

Using Selenium WebDriver in Java to click on the Facebook sharing button for the specific post I am interested in

I'm struggling to locate and click the share button on a Facebook post. Let's say I have 4 posts displayed on my Facebook page, and I want to share one of them by clicking on 'Share' and then selecting 'share...' from a small ...

Error encountered when executing Selenium WebDriver

Currently in the middle of an online Python course and making progress, but encountering a challenge with pulling HTML data. The TypeError that occurs every time the process finishes has me puzzled. I've followed the instructor's steps closely, y ...

A guide on repositioning draggable child elements within the same parent using Selenium with Python

Consider the following HTML structure: <div name="parent"> <div name="child one"> </div> <div name="child two"> </div> <div name="child three"> </div> <div name="child four"> </div> < ...

finding textarea element in selenium for beginners

I'm having trouble finding the textarea field using Selenium. So far, I've attempted the following: driver.findElement(By.xpath("//textarea[@id='inviteColleaguesArea']")).sendKeys("[email protected]"); WebElement element=driver.findElem ...

Would you be able to assist me in automating the clicking of the Postcode Checker Search button using selenium

Struggling with my Selenium tutorial in Python as I can't get the postcode search button to click. Using: Python v3.9 Chrome v87 The URL for practice is: This is the code snippet I'm currently working with: # Selenium Tutorial #1 from selenium import ...

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

Executing Auto-Suggestion with Selenium

Encountering an issue when trying to select an option from a dropdown using autosuggestion. Seeking a solution for this problem. Below is the code snippet related to this matter :- @Test(priority = 4) public void ReportType() throws InterruptedException ...

When attempting to click on an element using watir-webdriver, the process failed with the error message "Runtime.evaluate threw exception: Error: element is not attached to

Explanation of HTML Attributes <li class="filter-categ"> <ul class="l-h-list"> <li id="filter__entityBased" class="item filter_value" filter-name="entityBased" search- name="zone/concept/store_based">Zone/Concept/Store base ...

"Mastering the art of inputting values on a webpage with the use of

Consider the following HTML structure: <div class="divSearchContainer"><input type="search" class="FL H100P" placeholder="Select"><div class="divSearchIconConatiner H100P CP FL" title="S ...

"I'm trying to figure out the best way to use Selenium and Python to send a character sequence to a contenteditable element that has its attribute set

Recently, I've been experimenting with using Python 3.6 and Selenium to automate a simple task - logging into a chat website and sending messages automatically. is the webpage where I want to send the messages. Despite my limited experience with Python, ...

Error encountered in main thread: org.openqa.selenium.WebDriverException - an unexpected error occurred: net::ERR_CONNECTION_CLOSED

I'm new to QA and I recently attempted to automate for the first time using Microsoft Edge Version 109.0.1518.61. Unfortunately, I encountered these errors: Here is the first error, and here is the second error. SLF4J: Failed to load class "org. ...

Building a Personalized Docker Image for Node.js and Selenium-Webdriver: Step-by-Step Guide

Having trouble getting my automation project to run in Jenkins. Issues with Docker images downloaded from the Internet and Linux agent compatibility with my Windows environment. I manually downloaded Google Chrome/Chromedriver in the build, but still can& ...

Navigating to a different tab or window in Selenium that presents XML-style formatting instead of the typical web-view

There is a situation where, upon clicking a button on a website, it opens a new page in a separate tab. This new page is not your typical webpage, and the standard switchTo().window() function does not work as it shows an error message stating "Web view no ...

Having difficulty accessing span class and data

Having trouble getting text from a specific span class. <span class="one"> First Text </span> <span class="two"> Second Text </span> Attempting to locate it using JAVA code WebElement element = driver.findElement(By.className("o ...

Can you explain the functionality of setElementConverter in Selenium WebDriver and how it is used?

Having trouble locating an element after a page refresh. Any attempt to interact with the element results in a StaleElementReferenceException error stating that the element is no longer valid. Found some information on this issue at this link The URL abo ...

Go through a series of items and collect data for each item from a web browser, then add the collected data to a data frame as the end result

I've been working on extracting stock market data from web browsers. So far, I've managed to extract data for a single stock successfully. Below is the Python code snippet for extracting data for a single stock using Selenium Webdriver to open t ...

WebDriver and Python: A guide on capturing a dynamically changing URL and storing it in a variable efficiently

Python and Selenium webdriver script: elem = driver.find_element_by_css_selector("#username") elem.send_keys("username") elem = driver.find_element_by_css_selector("#password") elem.send_keys("password") drive ...

Implementing Firebase Push Notifications in C#

Need help sending push notifications to multiple users in Firebase using C#. I have successfully sent notifications to individual users using FCM, but I encounter a Bad Request Exception when attempting to send to multiple users. Thank you in advance for ...

Python code using Selenium Webdriver along with Firebug, NetExport, and FireStarter is failing to generate a har file

I have been experimenting with Selenium, Firebug, NetExport, and FireStarter in Python to analyze the network traffic of a specific URL. Despite setting up the code to generate a HAR file in the designated directory, nothing seems to be appearing as expect ...

Using Python to Automate Chromium with Selenium

I have developed a Python script that uses Selenium to gather data from various websites. It works perfectly on my Windows PC, but I'm now faced with the challenge of making it run on my Raspberry Pi. Since Chrome is not supported on the Pi, I need to use ...

Searching for text contained within a specific class

I am struggling to locate text inside a class with multiple instances of the same name. I have attempted different methods but can't seem to get it right. HTML: <td class="cells"> searchingValue </td> C# var createdUser = driver.Find ...

The website has identified that a Selenium bot is trying to access it. Are there any other websites available for testing purposes as part of a Selenium tutorial

I'm currently conducting a test on the Lufthansa website using a Selenium webdriver. I encountered an issue where the "FROM" field is pre-filled with the value "Casablanca", and despite clearing it, it automatically reverts back to "Casablanca" when clic ...

The program encountered a java.lang.NullPointerException error stating that it is unable to call the method "org.openqa.selenium.WebDriver.findElement(org.openqa.selenium.By)" due to the null value of "this.driver"

Help Needed: Error Message: java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.WebDriver.findElement(org.openqa.selenium.By)" because "this.driver" is null Below is the code and a screenshot of the error: https://i.stack.imgur.com/A7F49.p ...

Using Python to interact with Selenium to click buttons that share the same name and ID

I am in need of an application that can click on the correct button when a specific option is available. I have identified a value that will change when the other option is not present. <form name="uniforma_NE" id="uniforma_NE" .=&qu ...

Unable to find the email address box on the AWS login page

Having trouble finding the email input box on the AWS login page? Even after trying css selector and xpath, Selenium is still unable to locate the element. Here is my css selector: #resolver_container > div > input This is the code I am using: We ...

selenium.common.exceptions.InvalidArgumentException: Error: the specified argument is not valid - incorrect locator provided

Hey there, I've been working on creating a bot using selenium and encountered an issue with the send keys function. Despite trying for hours, I can't seem to figure out how to make it work. If anyone has any insights or solutions, I would greatly ...

Occasionally experiencing timeout exceptions with Webdriver. The HTTP request to the remote WebDriver server for a specific URL is causing intermittent issues

My tests started failing randomly across IE and Firefox from today. All the failures are showing me this exception. Earlier, I was using VS2013, with Nunit version 3.0.1, IEDriver 2.45.0.0, Selenium.Support and Selenium.WebDriver 2.48.2. I initially though ...

Selenium in C#: Timeout issue with SendKeys and Error thrown by JS Executor

Attempting to insert the large amount of data into the "Textarea1" control, I have tried two different methods. The first method successfully inserts the data but occasionally throws a timeout error, while the second method results in a JavaScript error. A ...

Encountering ERR_EMPTY_RESPONSE in Google Chrome while utilizing BrowserMobProxy for conducting Selenium tests

I have developed a simple method for extracting network traffic data from Chrome: public void saveNetworkTraffic() { System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir") + "/bin/chromedriver"); String sFileName = "networkl ...

When using Python Selenium, the driver.close() method may result in an error stating "no such window: target window already closed; web view not found" when attempting to close a new tab

Recently, I've delved into working with multiple tabs in Selenium and encountered a peculiar issue. When running the following code: WebDriverWait(driver, 10).until(EC.number_of_windows_to_be(2)) driver.switch_to.window(driver.window_handles[-1]) time.slee ...