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.

"Uncovering the Mystery: The Curious Case of My Browser Launching Twice in J

Hey there, I'm a beginner when it comes to Webdriver and Junit. I've been searching for a solution to this puzzle but haven't had any luck so far. I declared my driver as Static Webdriver fd at the top and tried running test cases on single ...

Selenium Java: Mastering the Art of Dragging and Dro

When using Selenium, I attempted to drag and drop content into a search-textbox. However, the drag operation is successful but the dropping part into the search-textbox does not work as expected. Can someone provide guidance on how to successfully drop t ...

Unable to interact with a button using Selenium

I have been working on automating a process that involves clicking multiple buttons. I've made significant progress, but there's one button that I just can't seem to get to work. I'm using Python with Selenium for this task. No matter w ...

Selenium for object capturing

While using Firefox and inspecting a link in my web application, I came across some code that I believe can be used to target an object: cb_or_somename_someothername cb_area_0219 This specific string is the "classname" in Firebug. When I attempted to fin ...

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

Mastering the Art of Link Clicking in Email Communications

As part of my website testing with Selenium, I am facing a challenge after a user registers. They need to click on a link sent to them via email to complete the login process. While I am able to access the email, I'm uncertain about how to automate cl ...

What is the method to select a hyperlink that includes a variable in the "href" attribute and click on it?

Currently, I am in the process of creating acceptance tests utilizing Selenium and WebdriverIO. However, I have encountered a problem where I am unable to successfully click on a specific link. client.click('a[href=#admin/'+ transactionId + &apo ...

Extract initial odds data from Oddsportal webpage

I am currently attempting to scrape the initial odds from a specific page on Oddsportal website: https://www.oddsportal.com/soccer/brazil/serie-b/gremio-cruzeiro-WhMMpc7f/ My approach involves utilizing the following code: from selenium.webdriver.common.b ...

Tips for interacting with the window element (for uploading files) via Selenium in Jenkins

In my automation tests, I am using Java and Selenium to perform tasks. One specific test requires uploading an image from the computer. To achieve this, I have utilized the Robot object to identify the upload window and specify the file path. Interestingly ...

UPDATE: The catch block in my code is not functioning properly for exception handling

MODIFIED I made some changes to my code, implementing the following function in my page object. public void searchItem(String keyword) throws Exception { driver.findElement(searchBoxLocator).sendKeys(keyword); try { new WebDriverWait(driv ...

Error encountered while executing Selenium Web Driver's executeScript method: [JavascriptError: missing ) after argument list] with name: 'JavascriptError'

return driver.executeScript("\ console.log('Error: Incorrect selection');\ $('option:selected', 'select[name='who']').removeAttr('selected');\ $('select[name='who'] ...

Error message: Trying to access a property of an empty object (variable 'element') is not possible

I've been attempting to execute the following code: WebElement body = driver.findElement(By.xpath("/html/body")); js.executeScript("var injector = window.angular.element(argument[0]).injector(); var $http = injector.get('$http'); return ($ht ...

Leveraging explicit waits to enable autocomplete functionality in Selenium

I'm in the process of updating this code to utilize explicit waits: class InputAutocompleteElement(InputElement): def __set__(self, obj, value): driver = obj.driver element = self.find_element(driver, self.locator) time.sleep ...

Encountering problems with the python and selenium code I used to create my Twitter scraper

I have developed a Python script that extracts information like name, tweets, followers, and following from the profiles available in the "view all" section of my Twitter profile page. The script is currently functioning as intended. However, I have encoun ...

Automating button clicks with Python and Selenium (Updated for a different problem)

After encountering ad pop-ups on a previous mp3 converter site, I decided to try using an alternative website, h2converter.com/tr/, for my script. However, this time the web driver had trouble finding the button and the program stopped due to a timeout e ...

Selenium and Docker: Struggling to load a personalized Chrome user profile

Hey there, I posted an issue a couple of days ago, but it seems like it's not really considered an issue. However, my problem still persists, and I'm hoping someone can help me figure out what's going on :D You can find the detailed discus ...

Choosing a date from a jQuery datepicker-Ui with Selenium WebDriver

Is there a way for Selenium web driver to choose a specific date from a jQuery datepicker-UI and input it into a date field? 1) I attempted using Jscript to set the date, but it seems that the date must be chosen from the jQuery pop-up window for the form ...

Adjustable ember count within Intercom HTML using Selenium and Python

My goal is to automate tasks at my workplace, but I am facing some challenges. Due to the lack of admin access on my work Intercom App, I have resorted to using Selenium. I need to input "Hey" into the chat box on Intercom and send the message successfull ...

Catching the Selenium NoSuchElementError in JavaScript is impossible

Update: It's puzzling why this was marked as answered since the linked questions don't address the issue at hand and do not involve Javascript. My objective is to detect this error, rather than prevent it, given that methods like invisibilityOfElementLocat ...

Tips for starting Safari using SafariLauncher on an actual iPhone

After following the tutorial on , I managed to create a project. However, I am now facing difficulties in finding a tutorial for running Appium with a web page. I have made edits to customize it according to my needs, for example, launching google.com whic ...

Can Maven be utilized solely for executing the Selenium plugin?

In our current pom.xml file, we have both the build settings and the selenium execution using the selenium-maven-plugin. I am interested in separating these into two separate pom files - one for building and running unit tests, and another dedicated speci ...

Preventing test case failures in Java selenium: A step-by-step guide

I'm facing a situation where I need to halt the execution once one of the conditions in the else part is met. Here's my code snippet. When the condition in the else statement is reached, I want to stop the execution. How can I achieve this using ...

The unsuccessful functionality of Junit tagging in Selenium webdriver

I am currently utilizing Selenium Webdriver along with cucumber, gherkin, and java. I have tagged all my scenarios with labels such as @website, @wip, @disabled, etc. Whenever I attempt to use a junit runner to create specific test sets, it ends up execut ...

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

Python and Selenium: Mastering the Art of Drop-Down Menus

I am currently on the hunt for a dropdown element in order to select an option from it. I know that Selenium has a built-in class specifically for handling select drop-downs, but I'm having trouble locating the actual element. Could someone point out ...

What causes Selenium ITakeScreenshot to capture a black screen from an IE window?

While working with a Class Library.dll that contains SpecFlow tests written in C# / Selenium, I encountered an issue where using the standard code to capture a screenshot resulted in just a black window. This was puzzling as previous builds and .dll files ...

Accessing pop-up windows with the Selenium Robot Framework

I am having trouble accessing a pop-up window using the selenium webdriver in the robot framework. Here are the steps I have taken: Visit the site "" Click on the "Search By Vehicle" tab. A pop-up window opens. I attempted to access the pop-up by usin ...

Facing difficulties with the XPATH due to an inability to access specific parts of the HTML code

Currently, I am facing an issue where I need to click on a link using Selenium and Java. When searching for the link using XPath, I am encountering a problem where only white spaces are displayed instead of most of the webpage content. The highlighted link ...

What is the best way to extract data from each individual product subpage using Selenium?

My goal was to extract information from a specific website. url = "https://www.goldenvisas.com/investment?location=portugal&paged={page}" Once I had successfully managed the pagination, my next task was to collect data within each 'prod ...

The message from the renderer in Selenium has taken longer than expected to be received

Since the latest version of Chrome (64.0.3282) was released yesterday, I have been encountering an error that occurs sporadically: An error message reads: Timed out receiving message from renderer: 600.000 Running approximately 2,000 Selenium tests wit ...

Ways to have a function return a promise from the final "then" in a series of promises

I am delving into the world of test automation with Selenium and JavaScript. As a newcomer to both, along with functional programming and promises, I am facing a challenge in creating a function that performs three essential tasks: Click on an input Clea ...

The action of clicking on the dropdown menu does not yield any results

see image description hereI am new to Python with Selenium and I am practicing. I am attempting to click on a dropdown element, it appears highlighted but does not respond to clicks. Below you will find the code I have used along with a screenshot and th ...

Obtaining the data 'beyond' the span element using selenium

I am attempting to extract the value 9.692 from the following: <li><span class="tab-box">Deposit:</span> 9.692</li> Despite my efforts, I am struggling to retrieve text outside of the span tag. To fetch the text "deposit," I have ...

Can you explain the functionality of the Selenium Service class?

I am intrigued by the function of the Selenium class known as "Service." Could this be beneficial for configuring a Chrome driver instead of simply invoking a webdriver with my_driver = webdriver.Chrome(...)? After reviewing the documentation, I found it ...

Tips for determining the security of a website using Selenium Java

I am working on automating a scenario where I need to ensure that the connection to a URL is secure without any SSL certificate issues. My testing environment includes Selenium WebDriver with Java, and I need to support IE and Chrome browsers. Unfortunatel ...

Having problems initiating a remote session with WebDriver - encountering a TypeError: string indices should be integers

As one of my initial attempts at writing a Python script, I am working on running a test case on localhost hosted on an IIS server in a local environment. To achieve this, I have made the following adjustments: Changed Firefox Settings to 'No proxy' Conf ...

The decision was made not to assess a string as JavaScript due to the use of 'unsafe-eval'

Hey there, I'm currently utilizing phantomjs for automation testing. Take a look at the code snippet below: capabilities = Selenium::WebDriver::Remote::Capabilities.phantomjs("phantomjs.page.settings.userAgent" => "Mozilla/5.0 (X11; Linux x86_64) ...

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

Tips for conducting Performance Testing using Selenium

I have been trying out new things lately, specifically focusing on selenium for the past 4 months. Can selenium be used for performance testing? If so, how can it be done? I would appreciate any information provided. ...

Unable to input data into form text box using Selenium WebDriver

Hello, I have encountered an issue while using the way2sms website and trying to enter a mobile number in the send SMS screen with Selenium WebDriver. Here is the relevant HTML code: form id="smsFrm" name="smsFrm" method="post"> <input id="ssaction" ...

Display the exact index of the search result on the console

driver.goTo("https://maps.mapmyindia.com/"); Thread.sleep(3000); driver.findElement(By.xpath(".//*[@id='onboarding-popup-sec']/div/div/button")).click(); File data = new File("D:\\Screenshots\\CityList.xlsx"); FileInputStrea ...

Having trouble selecting the input text box element in Selenium using Java

My goal is to extract data from an input text box and update it without using id or name. Each input tag will have different values for id, name and value. Below is the HTML code snippet for one of the input tags: <input id="rgrdSearchResult_ctl00_ctl0 ...

Is it feasible to take user input in Python with AWS Lambda?

I am currently developing an AWS Lambda function with the purpose of assisting users in collecting data from a website by using selenium and headless-chromium. The website has a SMS code verification process during login, which requires the user to input t ...

Interact with the "Allow cookies" notification using Selenium in Python

I've been struggling to click on the accept button of the website, but for some reason my code isn't working. from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions ...

Serenity BDD does not have the capability to capture screenshots using appium

Having an issue with Serenity BDD and the Screenplay Pattern in combination with Appium 1.3.1. The problem is that the project is not generating screenshots for each step, resulting in the report not displaying the captures of the steps. Despite no errors ...

Is it feasible to extract information added post page load, potentially through JavaScript, using bs4 and requests (or selenium) in Python?

I've recently started working on a Python project and I'm exploring BeautifulSoup (bs4) and Requests for the first time. As I navigate through a webpage, I notice that all the data I need is loaded dynamically through JavaScript. How can I extract this dat ...

Selecting multiple IDs at once or choosing individual IDs in selenium

When it comes to selecting elements from HTML, what is the correct approach: gathering all IDs on a page together or selecting each ID individually? Let me provide some context. I have an HTML page with information linked to specific IDs. However, these I ...

Extract information from a table where the elements take some time to fully load into view

My latest project involves scraping data from a table using selenium. Unfortunately, every time I run the code, it only manages to retrieve the header of the table. from selenium import webdriver driver = webdriver.Chrome() driver.get('http://www.pa ...

Error encountered with Selenium script execution

As a newcomer to selenium, I require assistance with the following script where I am attempting to input a value via a text field. Below you can find the code snippet. import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import or ...

Utilizing Selenium WebDriver for Automated Testing of Dropdown Menus

When it comes to selecting an option from a dropdown box, there are multiple approaches that can be taken. I have previously used the following method: driver.findElement(By.id("selection")).sendKeys("Germany"); However, this method did not always guaran ...

Keep looping for printing screenshots

Looking for some assistance. I have a Python script that loads URLs and takes screenshots. Here's what I'm trying to accomplish: Instead of using an array, read URLs from a text file Take individual screenshots of each loaded URL and save them ...

Encountering a stagnant element while performing Selenium testing in the C3 framework

Currently, I am utilizing Selenium testing and have identified all div elements with an id containing a specific name (in this case, "center-"). var x = driver.FindElements(By.XPath("//div[contains(@id, 'center-')]")); When attempting to itera ...

Selenium Error: Unresolved attribute reference for class "list" with ".text"

As per the guidance provided by Selenium: # Opening the specified URL driver.get("https://www.example.com") # Extracting text from the element text = driver.find_element(By.CSS_SELECTOR, "h1").text However, when I implemented this approach, I encountered ...

Waiting for an Element to Become Visible in Selenium-Webdriver Using Javascript

When using selenium-webdriver (api docs here), how can you ensure that an element is visible before proceeding? Within a set of custom testing helpers, there are two functions provided. The first function successfully waits for an element to exist, howeve ...

Looking to implement a single tag with multiple values depending on the situation in cucumber?

In our automation framework, we have a cleanup hook that is tagged from the cucumber feature file. For example: @cc_task_clean_up_hook_enrol_A Scenario: Person can enrol_A When I select the context menu Then I am able to enroll the patient into & ...

What should I do when faced with an unexpected alert while using the Selenium Driver?

Currently, I am working on testing the functionality of www.uhc.com using Selenium with Java and Chrome browser. The website includes a random pop-up that appears while the script is executing, prompting the user to take a survey with just yes or no opti ...

Running Selenium scripts concurrently

I have a group of test cases that have been automated using Selenium scripts in C# with NUnit. I am able to run these tests individually, but now I need to run them simultaneously. Can anyone provide guidance on how to achieve parallel execution for thes ...

The execution of the Selenium TestNG executable JAR is encountering errors and not

I have created a Selenium + TestNG maven project in Java using Eclipse IDE, located in the directory I:Projects. When I run the testng.xml file by right-clicking the project, it successfully launches the Chrome browser. I decided to export this project a ...

Debugging remotely in Chrome within a Selenium grid

Currently, I am managing a selenium-grid setup that consists of multiple chrome instances. The selenium grid is spread across 2 Windows machines with several nodes. The test executions are carried out from a separate machine that connects to the grid. In o ...

What is the process for extracting the download button URL and parsing a CSV file in Python?

In my Python Google Colab project, I am attempting to access a CSV file from the following link: After scrolling down slightly on the page, there is a download button visible. My goal is to extract the link using Selenium or BeautifulSoup in order to read ...

Having trouble interacting with Bootstrap dropdown using Selenium in Python

I have a dropdown menu on my frontend that has the following structure: <div class="dropdown-menu dropdown-menu-right text-left" id="dropdown_menu"> <a class="dropdown-item" data-toggle="modal" ...

Is the presence of the selenium webdriver being registered?

Is there a method to detect if a website can tell I am using a bot while running Selenium WebDriver in Python or Puppeteer in JavaScript? Are there any resources that indicate whether a bot test would be failed, such as Cloudflare or Captcha? Appreciate a ...

Obtaining the dynamic id with xpath in Selenium WebDriver

I am having trouble retrieving the id of an element that starts with 'u_' and ends with '_5', with varying data in between. Sometimes it appears as 'u_d_5' while other times it is 'u_6_5'. The usual methods like star ...

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"); ...

What are the solutions for resolving the 'Source not found' error while debugging in Eclipse with Selenium WebDriver?

Currently, I am honing my skills by constructing a test automation framework using Selenium Webdrive within Eclipse alongside Java. As part of this process, I am meticulously debugging the code I have written to ensure a comprehensive understanding. It&apo ...

The ChromeDriver capabilities that have been configured are not maintained once the WebDriver is constructed in Node Selenium

I am currently experimenting with adding the default download path using Chrome capabilities in my code snippet below: const test = async () => { let builder = await new Builder().forBrowser("chrome"); let chromeCapabilities = builder.getC ...

Obtain the next sibling element using Java and Selenium

On this page, I am trying to access the Game Locations table: <h3><span class="mw-headline" id="Game_locations">Game locations</span></h3> <table class="roundy" style="margin:auto; border: 3px ...

"Exploring the use of Selenium Webdriver to extract data based on class name

<li class='example'> content1 </li> <li class='example'> content2 </li> <li class='example'> content3 </li> Within this HTML snippet, I am aiming to gather all the text within elements that have the 'example' class. dr ...

The Pylance tool reported that the import statement for "selenium" could not be resolved in the code

While editing a file in VS code, I encountered an error message stating: Import "selenium" could not be resolved Pylance (reportMissingImports). Below is the code snippet from metachar: # Coded and based by METACHAR/Edited and modified for Micro ...

Using C# Selenium WebDriver to efficiently locate hyperlinks based on several specific strings, all while incorporating a reference within the string

I am trying to click a link using two different strings. However, the code I have tried does not seem to be working. Can anyone provide any guidance? var xPathString = String.Format("//a[contains(text(), 'Enforcement') and contains(text(), '{0}')]", ...

Utilizing Selenium webdriver to retrieve images from the internet

Currently, I am attempting to retrieve images from a website using the following code snippet: List <WebElement> listofItems = driver.findElements(By.cssSelector("div.heroThumbnails:nth-child(4) > div:nth-child(2) > div:nth-child(n)")); URL ...

Tips for selecting a checkbox that triggers an ElementNotInteractableException using Selenium WebDriver and Java

Every time I try to click on a checkbox, it keeps telling me that the element is not interactable. I've attempted various methods such as .click, javascriptexecutor, actions, wait until, thread.sleep, and scroll. Even when I attempt to context click on th ...

Encountering a problem with app configuration when executing Appium code

Configuration Error: @BeforeTest setUp org.openqa.selenium.SessionNotCreatedException: Unable to establish a new session. (Issue: No app selected; make sure to start appium with --app or specify an 'app' value in desired capabilities, or set androidPacka ...

Guide on clicking a label element with Python and Selenium

I have been working on a web scraping bot using Python and Selenium, but I've encountered an issue. The website I'm trying to scrape has a fieldset HTML tag with 4 label tags inside it. All these labels have the same class name and I need to click on one o ...

Tips for managing the Authentication header within Selenium

I am currently learning about Selenium and attempting to handle an authentication header that has been implemented on a website for security purposes. I am trying to access the site and send data via URL using Selenium, but due to the authentication requir ...