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.

Using Selenium webdriver to set up proxy settings in Internet Explorer

Looking to implement proxy settings in Internet Explorer using WebDriver. Here's the code I'm currently using: System.setProperty("webdriver.ie.driver", "Path to IEDriverServer.exe"); Proxy proxy = new Proxy(); proxy.setProxyAutoconfigUrl("proxyh ...

Issues with Google ChromeDriver not Initializing

Has anyone found a solution to this issue? I have instantiated the driver and opened the browser, but I am encountering the following error: [01:53:15,339] INFO [CheckOut-0] - ####### Test 'MyTestCases.CheckOut' started Starting ChromeDriver (v2.9. ...

Selenium is being used to block login automation in Edge modal

Currently, I am working on a Python script to automate logging into Edge using msedge-selenium-tools. However, when running the script, a modal window pops up and I am facing challenges in identifying CSS selectors to use with Selenium. Here is the snippet ...

Exception handling: Either a timeout occurred or the element could not be found

@Test public void TC8() { driver.findElement(By.id("id_username")).sendKeys("admin"); driver.findElement(By.id("id_password")).sendKeys("admin"); driver.findElement(By.cssSelector("button,input[type=' ...

Navigating through web addresses while extracting data tables with Selenium?

I am attempting to scrape tables from the humane society legislative fund. I have successfully extracted data from one page using this code: import time import pandas as pd from selenium import webdriver from webdriver_manager.chrome import ChromeDriverMan ...

What is the best way to input a combination of keyboard keys in Selenium WebDriver using Java?

I need to input the number 1999 into a text box using Selenium WebDriver (Java). However, the code I tried using to combine key strokes before sending them is not working: String allKeys = Keys.NUMPAD1 + Keys.NUMPAD9 + Keys.NUMPAD9 + Keys.NUMPAD9; An err ...

I recently began working on a script using HtmlUnitDriver but encountered an unexpected error

I have encountered an issue while working on a script using HtmlUnitDriver. The error message I am receiving is "java.lang.NoClassDefFoundError". Could someone assist me in resolving this problem? Please review the code and error details below. Below is t ...

What is the equivalent of the DataSource attribute for mstest in .NET Core?

Is DataSource attribute supported in .NET Core projects of MSTest? If not, what is the alternative? For more information, visit: https://learn.microsoft.com/en-us/visualstudio/test/how-to-create-a-data-driven-unit-test?view=vs-2019 Note: In .NET Core, th ...

Tips for turning off Chrome permission notifications in Selenium WebDriver

After upgrading to Chrome version 89 and configuring the settings as shown below, I am still facing issues with dismissing the permission popup that is blocking the execution of further test cases. Any suggestions or workarounds? https://i.stack.imgur.co ...

Expected "@" but got a syntax error on token "boolean"

I encountered an issue while trying to verify the presence of an alert message. I attempted to use the following code snippet: public boolean IsAlertPresent() { try { driver.switchTo().alert(); return true; ...

Using DataProvider to read an Excel file and skipping the first row

Unique Heading how can I skip the first row in a loop and avoid getting null values I'm trying to skip the first row by starting my loop at i=1, but it's returning null values for the first row. Problem with First Row Values how can I skip the first ...

Selenium KEDA encountered a FailedGetExternalMetric Warning due to the inability to retrieve the external metric

Currently, I am utilizing selenium KEDA for auto-scaling purposes. However, upon reviewing the HPA logs, I stumbled upon an error stating that it FAILED to retrieve the Metrics. I would greatly appreciate any guidance or assistance in resolving this issue ...

Using Selenium and Python to inherit a web element class, maximize efficiency in web automation

I am looking to create my own custom web element class. For example: class MyWebElement(selenium.WebElement): def __init__(self, element): self = element def click(self): #my custom actions super().click() However, when I call super.click(), ...

Visual Studio build is disrupted by the presence of node_modules folder

I am currently in the process of integrating Angular (v4) into an existing ASP.NET MVC 4 application. Within this application, there is a project that includes Selenium Web Driver along with a web.config file. node_modulesselenium-webdriverlib estdata ...

Does IntelliJ only offer selenium in the Ultimate version?

Currently, I am working on creating a web bot using Python in IntelliJ. Fortunately, I came across a valuable plugin called selenium that has significantly improved my workflow. The only downside is that the selenium plugin is exclusively available for d ...

Is it incorrect to run the script multiple times in order for it to function properly?

After attempting to execute this script using both a while loop and a for loop, I noticed that it stops working after just one repetition. driver.find_element_by_class_name("submit").click() x = driver.find_element_by_class_name("submit" ...

Tips for resolving SSL certificate errors when using Selenium WebDriver with Internet Explorer

Currently, I am a beginner in utilizing Selenium Web Driver with Java. Successfully launching an application, but encountering SSL certificate errors. Seeking guidance on how to address this obstacle as I continue to learn and prepare for implementation at ...

What is the best method to create Promise API synchronously?

When it comes to testing with NodeJS, I rely on selenium-webdriver. My goal is to streamline the selenium-webdriver API by making it synchronous, which will result in more concise tests. The method getTitle() is used to retrieve the title of the current p ...

org.apache.http.conn.HttpHostConnectException: Unable to establish connection to host at 127.0.0.1 on port 7055

A problem has arisen with Selenium Webdriver(2.53) and Java (jdk 7). Mozilla Firefox ESR (45.2.0) crashes immediately upon opening a page, displaying the following error message: An Error Has Occurred org.openqa.selenium.remote.UnreachableBrowserExceptio ...

Tips for managing code while the web driver is active

After writing code using Python's Selenium and creating a graphical interface with PyQT5, I encountered an issue. Whenever I click on the start button, the web driver opens and my windows' code becomes inaccessible. It seems to freeze, but I still need t ...

Having trouble accessing the website link in the browser

I recently developed a basic automation script in Python using Selenium but encountered an unexpected exception. Here is the code snippet causing the issue: import pandas as pd from pandas import ExcelWriter from selenium import webdriver import seleniu ...

The removal of all cookies using `driver.manage().deleteAllCookies()` with Selenium does not function properly in conjunction with browser options

There seems to be an issue with the browser Options in Selenium where driver.manage().deleteAllCookies() is not working as expected. Here is a snippet of the code showcasing this problem. var profile = new firefox.Profile('./fProfile'); profile.setPrefere ...

Having trouble getting Selenium with Python to work in a shell script on Ubuntu?

I need assistance with deploying a selenium script on Ubuntu 20.04.3. I am encountering an error message when trying to run the script, as shown here: error on Jenkins Below is my current script: from selenium import webdriver from selenium.webdriver.ch ...

The button is not responsive to user interactions

For a Magento-based website, I have been developing an automated checkout script using Python 3.8. Everything was working smoothly until we reached the shipping selection stage. The error message "element not interactable" appears when trying to click the ...

What is the process of invoking a WCF service from a test runner?

I recently started exploring Selenium WebDriver to create black box integration tests. At the moment, I am using MSTest as my test runner. However, when attempting to call a WCF service to support my work, I encountered an error: The error message state ...

What could be the underlying reason for encountering the org.openqa.selenium.WebDriverException error?

While conducting UI Testing, I came across the following error: org.openqa.selenium.WebDriverException: Element not found or not visible for xpath: (//div[@class='popupContent'])[last()]/div/div/div/div/div[2]/div/table/tbody Build info: ...

What is the best method for retrieving an email address from a span text that does not adhere to a standard regular expression format using the Selenium web driver?

I am currently working on a task involving automation. My goal is to extract all email addresses from text spans that contain more than 200 characters. However, these email addresses are not in the regular expression format and are instead displayed as: E ...

What is the process for extracting data from MS 97-2003 Worksheet using Selenium Webdriver?

I am attempting to access and read the .xls file (MS 97-20003 Worksheet) that has been downloaded from our application using Selenium WebDriver. However, I am encountering the following error: "org.apache.poi.poifs.filesystem.NotOLE2FileException: The sup ...

Issue: 1506741262570 Marionette ALERT Port 2828 connection established with Selenium

My goal is to utilize Selenium with Firefox to launch Google. The version of Firefox I am using is 52.3.0 (64-bit). Here is the code snippet I have tried: System.setProperty("webdriver.gecko.driver","C://geckodriver-v0.19.0-win64_2//geckodriver.exe"); ...

Webdriver Manager Python installation failed due to site-packages being read-only; defaulting to user installation to satisfy requirements

When I try to import WebDriverManager for Chrome, here's the output I receive: $ pip install webdriver-manager Defaulting to user installation because normal site-packages is not writeable Requirement already sa ...

[Protractor][Scroll] I need assistance with scrolling my webpage using a while loop. Could someone please help me troubleshoot the code?

When this function is called, it initiates scrolling and then pauses the browser for a 2-second period. scrollToElement(webElement: any) { browser.executeScript('window.scrollTo(0,400);').then(()=>{ console.log("sleeping"+ browse ...

Having trouble locating the Selenium element on the webpage?

I am encountering an issue with Selenium during a click event WebElement btn = driver.findElement(By.xpath("//form[@name=\"addMemberForm\"]/div[14]/div/button")); System.out.print(btn); The output of the print statement [[ChromeDriver: chro ...

In search of a CSS selector that can target elements based on specific text contained within them

Query: <div class="btn btn-second-in-pair-not-desired btn-tall">Clear search</div> <div class="btn btn-second-in-pair-not-desired btn-tall">Raw Search</div> <div class="btn btn-second-in-pair-not-desired btn-tall">Basic Searc ...

Code to retrieve text from the project issue description using Selenium

I am encountering an issue with extracting content from Gitee using Selenium in Python. Whenever I attempt to extract the text, it returns blank results. Here is the element inspection: https://i.stack.imgur.com/5aulV.png My goal is to retrieve all the t ...

Mastering the art of waiting in Selenium using Java

I'd love to learn more about the inner workings of the "fluentwait" method. Can someone break down how it operates and its overall structure? Wait<WebDriver> wait = new FluentWait<>(driver) .withTimeout(60, TimeUnit.SECONDS) .pollingEvery(5, ...

What steps can be taken to overcome the ElementNotInteractableException error in Selenium WebDriver when dealing with invisible elements?

Hey everyone, I'm currently facing a coding challenge and I need some assistance. Below are images of my code and the error I'm encountering. Can anyone provide me with guidance on how to fix this issue? https://i.stack.imgur.com/SBNy2.png http ...

How to Use Selenium to Locate the Innermost Elements that Contain a Particular Text

Is there a way to retrieve a list of elements from a webpage that contain a specific string without modifying the page's structure? I am currently using Selenium with XPath for evaluation, leveraging the browser-supported XPath engine. Here is a simp ...

What are some strategies to prevent erratic actions caused by Selenium's StaleElementReferenceException in Python?

I've been working on a project involving automation that opens YouTube, plays a specific video, accesses the "Stats for Nerds" dialog, and extracts information from it. This process was functioning properly yesterday. However, today I added commands to adj ...

What is the best way to choose multiple items from a listbox using Selenium in C#?

ElementSelector Element = new ElementSelector(driver.FindElement(By.Id("ddlCUcardNo"))); Element.SelectByIndex(2); I'm encountering an issue with a listbox while using Selenium in C#. I need to be able to select multiple items (options) from the list ...

What causes Selenium to return empty search results?

I've been attempting to scrape data from this website, but encountered an error when trying to input the search phrase. AttributeError: 'NoneType' object has no attribute 'send_keys' After researching on StackOverflow, I learned t ...

Comparing the name and URL of a link using Selenium webdriver in C#

I am currently looking for ways to automate the testing of links on a Sharepoint site, ensuring they are connected to the correct URL. However, I have hit a roadblock when it comes to performing the comparison. After locating the links and adding them to ...

Choosing a row within a table and then opting for a particular radio button positioned beside it

My challenge is selecting a specific row in a table on a website along with the corresponding button next to it. The issue arises when trying to select the button unique to each row, instead of simply remembering the last button position as it currently do ...

Tips for eliminating a web element from the field using Groovy

As outlined in chapter 4.10 of this guide: To eliminate the contents of a webElement, I can execute the following: webElement << Keys.chord(Keys.CONTROL, "a", Keys.BACK_SPACE) However, I find this approach to be less than ideal. Is there a way to ...

How can I execute Java Selenium tests on Chrome while blocking third-party cookies?

I am aiming to modify some java selenium tests so that they run on Chrome with third party cookies blocked. Is there a way to achieve this? Are there any successful examples available demonstrating how to accomplish this task? I have come across suggestio ...

Having trouble navigating to the next page with Webdriver Selenium?

Currently, I am working on a python script that utilizes Chromedriver and Selenium in order to extract data from a specific website. However, I have encountered an issue where after successfully scraping data from one page, the program fails to switch to t ...

Unable to establish a connection with the python3 service located at /usr/local/bin/geckodriver

Here is the code snippet I am using: #!/usr/bin/python3 from selenium import webdriver driver = webdriver.Firefox(executable_path=r'/usr/local/bin/geckodriver') driver.get('http://www.python.org') The error that I am encountering is ...

With Python and WebDriver, the unittest module allows you to run tests without opening a browser

Could you assist me with the following issue? I have identified the problem but have been unable to resolve it. When I run the following code, the browser launches and the test passes: import unittest from selenium import webdriver driver = webdriver.Chro ...

What is the best way to eliminate the "driver" instance from the test classes?

Can someone assist me with this question: I am seeking guidance on how to eliminate the instance driver from the BaseTest class while still being able to utilize it in the class and its subclasses? I am currently using POM to construct a testing-framewor ...

Unable to select checkbox within a table using Selenium WebDriver with Java

Having trouble checking a checkbox inside a table using Selenium Webdriver in Java? Even with version 2.52.0 of Selenium, the element not found error persists across different web browsers. The iFrame seems to be correct as I can interact with other compon ...

Have you noticed blank screenshots appearing in extent reports when using Junit?

Utilizing Junit and cucumber framework for the execution of test scripts while setting up and running code on VDI. Check out the code snippet below, which is used to attach screenshots in the Apphooks- @AfterStep public void addScreenshot(Scenario sce ...

PageFactory error: incorrect amount of parameters provided (2 instead of 1)

Currently implementing the page factory pattern and encountering Argument errors in multiple locations. This is the code for my Homepage class: require 'page-object/page_factory' class Homepage include PageObject include Configuration def init ...

Running Selenium WebDriver instances in parallel can lead to interruptions in other tests when attempting to close one WebDriver

Having some difficulty with managing RemoteWebDriver sessions in parallel. This issue arises when multiple instances of RemoteWebDriver are running simultaneously and one instance calls the close method. Here's an example scenario: Test A begins an ...

Managing TAB behavior in Selenium

I am attempting to switch between two tabs and came across the following code snippet: ArrayList<String> tabs2 = new ArrayList<String> (page.getWindowHandles()); System.out.println(tabs2.size()); page.switchTo().window(tabs2.get( ...

TestNG is failing to run after the setup

What could be the issue in the code that is preventing it from running? Please provide guidance on how to resolve this. package tc1; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org ...

Uploading files using WebdriverIO v5 with Microsoft Edge

Currently, I am in the process of running an automation test on SauceLabs using WebdriverIO version 5. One of the tests involves uploading a file to Microsoft Edge. Below is a snippet of the code for reference: const path = require('path'); const filePath ...

"Incompatibility between Ruby + watir-webdriver and Selenium Grid2 causes an exception

Using selenium-server-standalone-2.18.0.jar. Configured the hub and node on the same host. Executing the client code on a separate host. Observing in the hub console, I notice that one of the nodes has connected with 5 firefox icons. Upon running my clien ...

Using Selenium WebDriver to Extract Variables from JavaScript SourceCode

Currently, I am dealing with a web page source code that utilizes JavaScript to display text. Below is an excerpt from the source: var display_session = get_cookie("LastMRH_Session"); if(null != display_session) { document.getElementById("sessionDIV") ...

How can Python Selenium capture the "thank you" alert message following form submission?

I attempted the following code to send a message on a WordPress contact 7 page Here is what I tried: email = driver.find_element_by_name('email') email.send_keys("<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7 ...

Tips for testing a polling javascript ajax call using Selenium Java WebDriver

I am facing an issue with my JavaScript code on a page that continuously polls an API and updates an element in the HTML every second. I need to test this functionality using Selenium WebDriver, but I'm unsure how to handle the polling aspect of the J ...

Selenium WebDriver textWait()

When testing AJAX applications, is there a specific waitForText() method in Selenium WebDriver that can be used? Essentially, I'm looking to verify the appearance of new or updated elements/text after an AJAX request. Is there a sample code snippet demon ...

Google Chrome offers an API specifically designed to provide detailed performance data for

Understanding the Issue Is there a way to retrieve data from the Chrome Performance tool either using the browser console or utilizing Chrome driver methods in Selenium? I am specifically looking to obtain the page loading time. The graphs at the top ind ...

Ways to obtain the XPath

If you don't already have an account, you can easily sign up by clicking on the "Sign up" button. However, I am having trouble locating the xpath for this web element and keep receiving an error message saying "Unable to locate element". I have tried ...

Is the drop down click feature malfunctioning in Selenium Java WebDriver?

Can someone please help me identify what is going wrong in my code? WebElement dropdown = driver.findElement(By.xpath("//*[@id='idCallType_100']")); List<WebElement> Options = dropdown.findElements(By.tagName("option")); Syste ...

Analyzing multiple elements for invisibility using Selenium is proving to be a time-consuming task

During one of my test cases, I am verifying the visibility status of certain elements. The process is quite simple: Login Verify that 5 buttons within the left menu bar are not visible (as the user does not have access rights) End the test This verifica ...

Unable to automate the selection of a dropdown menu using Selenium WebDriver

I am currently utilizing http://www.makemytrip.com/ This is the HTML code. <div class="mrgnBot30 clearFix"> <span class="watch_icn flL"></span> <div class="widget_inner clearFix suggest_me padBot15 flL"> <h3 class="clearFix has ...

I'm unable to bring in my package in this context. My current setup involves using Selenium version 4

from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import by serv_obj=Service("C:Driverschromedriver_win32chromedriver.exe") driver=webdriver.Chrome(service=serv_obj) driver. ...

Issue with Selenium WebDriver in Opera browser: Not able to retrieve message from renderer

I'm currently facing an issue while attempting to run my Java Selenium tests using Opera browser (version 31). I have the latest versions of Selenium Webdriver (2.47.1) and OperaChromiumDriver (0.2.2) installed. I've experimented with two different metho ...

Tips for navigating the cursor in Selenium?

My goal is to replicate mouse movements along a simulated curve line or parabola in order to mimic natural user behavior on websites. While I am familiar with using Selenium to click on elements, this method does not accurately simulate human interaction ...

I am experiencing difficulties with the functionality of switch_to_frame in selenium

How can I click the element below using Python Selenium Chrome WebDriver? <a href="javascript: d.o(18);" class="node">Maintenance</a> It works after switching to the right frame. browser.switch_to_frame("navigation") browser.find ...

Error encountered: WebDriverBackedSelenium NullPointerException

I've recently started using selenium and I'm still in the process of exploring its capabilities. Currently, I am trying to test an ajax element on a website. When I click on this element, some text appears in a specific area on the page. I have successfull ...

Python code to extract images from ResearchGate profiles

My current goal is to track down and download an individual's image hosted on research gate using Python. Despite trying various methods, I've encountered a 403 error with the initial request hit every time (even after attempting to tweak the hea ...

Once all functions have been completed, Selenium will autonomously shut down the browser

Having recently started programming, I have a question about Selenium. I am confused as to why the browsers opened by Selenium close at the end of the code. from lib2to3.pgen2 import driver from selenium import webdriver def Online_PLatform(): ...

Extract information from a webpage using Selenium WebDriver

Currently, I am working on mastering Selenium, but I have hit a roadblock that I need assistance with. My task is to gather all the betting information for games from the following link and store it into an array. Given my limited experience with HTML an ...

Tips for recognizing the initial element in a table with Selenium

wait.until(EC.presence_of_element_located((By.XPATH, "//table//tbody//tr//a[@data-refid='recordId'][0]"))) driver.implicitly_wait(20) line_item = driver.find_elements("xpath", "//table//tbody//tr//a[@data-refid='recordId'][0]" ...

Executing TestNG tests without the need of an XML file utilizing TestNG code

I have a set of tests ready, but I am facing an issue with running them. Currently, I am working in normal Java environment and to run multiple tests, I am using TestNG. However, I am unsure about how to write the code to run multiple tests using TestNG an ...