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.

While utilizing Selenium and Python, a cookie connected with a cross-site resource at http://yahoo.com/ was established without the inclusion of the `SameSite` attribute

Scraping a website using selenium resulted in the following message appearing in the output, amidst the desired content: [0306/125211.693:INFO:CONSOLE(0)] "A cookie associated with a cross-site resource at http://yahoo.com/ was set without the `SameSite` a ...

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

Encountering a TimeoutException while utilizing Selenium in Python

Utilizing WebDriverWait in my script involves two different instances with the same syntax. The first time I use it is to check for any typos within a defined class, while the second time is under a function nested within the same class. Surprisingly, an e ...

Determining the Exact DOM Element Referenced by a WebElement in Selenium Java

When using Selenium in Java, how can you determine which DOM element is being pointed to by a WebElement in the Java debugger and browser developer tools? Sometimes the selector can be quite complex, combining xpath and css Selector, so it's useful to be ...

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

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

What are the steps for linking a Azure App service with an Azure VM?

I am currently working on a Selenium Java project that involves web services. Within this project, there are 3 web services and it is being hosted on azure app service. However, I have encountered an issue where Azure app service does not provide its own v ...

Having issues extracting the .text from the first two elements of a list when iterating through li tags using Selenium

When attempting to iterate through a li tag on the operator tab at this link, I encountered an issue where the first two operators in the list were being skipped, while the rest displayed correctly. I tried both implicit and explicit waits to address this ...

Clicking on a specific tab within a webpage in order to enable selenium to extract data

from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from t ...

The executable file specified in "@php_bin@" is not a valid command recognized as being internal or external, operable program, or batch file

Recently, I have been using PHPUnit and Selenium Server for testing my Yii Application on a Windows XP operating system. I installed PHPUnit_Selenium (1.0.1) and followed the instructions provided in this forum post to set everything up: http://www.yiifram ...

Troubleshooting issues with loading scripts in a scrapy (python) web scraper for a react/typescript application

I've been facing challenges with web scraping a specific webpage (beachvolleyball.nrw). In the past couple of days, I've experimented with various libraries but have struggled to get the script-tags to load properly. Although using the developer tools all ...

Leveraging Python Selenium for extracting text containing Russian characters

When extracting text from a div using the selenium .text attribute like this: message_text = message.find_element_by_class_name("im_msg_text").text The output you may see when trying to print message_text is: 'message_text': u'u043au0430u043au043eu ...

The algorithm for dual verification for retrieving a code from a nearby database

My application needs to be automated. It should first enter the username and password automatically, then click the login button. Next, it needs to retrieve a static OTP code from the database and input it into the OTP text field so the user can access ...

Error encountered: Element cannot be clicked on at specified coordinates - Angular/Protractor

Recently, I have been testing out CRUD functionality in an Angular app using Protractor. One recurring issue I've encountered is with the create/edit buttons, which all open the same modal regardless of the page you're on. The frustrating part i ...

Having trouble running classes using Maven test with the Testng.xml file in the terminal, however, it runs smoothly in Eclipse

While I have been successful in running my solution through the testng suit in the Eclipse console, I am facing difficulties executing the testng.xml file via Maven integrated with Sauce Labs in the terminal. Output received on the terminal: ------------ ...

Searching for elements using XPath in Java with Selenium

While developing a web application, I encountered difficulty in locating a specific element using xpath. The HTML code containing the element I need to find is as follows: <table> <tr> <th class="details"> <lab ...

Selenium: The parent window automatically closes when a child window pops up

I'm encountering a challenge with switching to a child window in a specific scenario Scenario: 1. On the Login Page, I need to enter my user id and password. 2. After entering the credentials, I click on the submit button. 3. The system then opens a ...

A guide to extracting text using BeautifulSoup in Python

I am trying to extract the text "repairsonwheelsrim-hub.com" from the HTML using beautifulsoup. Can someone please guide me on how to achieve this? Currently, I am using the following code: webadress = profilePageSource.select("span#offscreen a[href]")[ ...

Python - Retrieving Required Text from a <td class = "text">Grab This Information</td>

Being a beginner in using selenium and python, my main objective is to retrieve the revenue value for a specific company from the Hoovers website. Here's my current code: company = 'Trelleborg' page = 'https://hoovers.com/company-information/cs.html?term ...

Automating Checkbox Selections with Selenium in Python

I'm having trouble clicking on a checkbox. Here is the HTML Code: <div class="mb-1 p-3 termsCheck"> <input class="form-check-input float-end" type="checkbox" value="" id="flexCheckDefault&qu ...

Unable to locate the element because it is not being displayed

My understanding is that when referring to a web element and initializing it through PageFactory.init, it will search for the element at that moment. However, in my situation, the isDisplayed method is throwing a NoSuchElementException. I simply want to c ...

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

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

The element within the iframe is elusive to Selenium

Having trouble locating the element beneath an iframe even after switching to the frame. see screenshot here The HTML code can be found at: http://pastebin.com/AShYrdxQ ...

Pass a parameter to an Angular class

I am encountering difficulties in inputting a value into an element with a ng-class Attempted the following code snippet: driver.FindElement(By.Id("limit")).SendKeys("10.00"); without success. I also tried - driver.FindElement(By.Id("limit_display")).Sen ...

Unable to interact with element on the following page using Selenium in Python

Attempting to extract data from multiple pages of a URL using Selenium in Python, but encountering an error after the first page. The code successfully navigates to the subsequent pages but fails to scrape, throwing an error message: "Element ... is not ...

When I attempted to extract data with selenium through web scraping, the data stored in my csv file appeared unusual. Instead of the expected content, all I found were j

from selenium import webdriver from selenium.webdriver.chrome.service import Service from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By import time import cs ...

What is the best way to choose the next adjacent element using a CSS selector with Python Selenium?

The structure of the DOM is as shown below: <ul> <li> <a href="#" role="button" class="js-pagination link" data-page="1">1</a> </li> <li> <a href="#" role="button" class="js-pagination link active" data ...

Step-by-step guide on retrieving particular files from a webpage with Python and Selenium

I am looking to download specific files from this particular page. The exact four files I need are: What is the best way to navigate through the page using Selenium while maintaining good programming practices? Are there any libraries that might be more ...

Encountering a TimeOutException in Selenium has caused difficulty in navigating to the third window on Internet Explorer

An error occurred in the main thread of the application: org.openqa.selenium.TimeoutException The page loading timed out. Build information: version - '3.141.59', revision - 'e82be7d358', timestamp - '2018-11-14T08:25:48' Syst ...

Can Selenium C# tests retrieve a parameter from a batch or PowerShell script?

My Selenium tests navigate to a specified URL using the code: driver.Navigate().GoToUrl("www.blahwhatever.com"); Currently, I am able to execute these Selenium tests using either a batch file or PowerShell script. Ideally, these scripts would be triggered ...

Exploring Selenium: Unraveling the Contrast between @FindBy and WebElement.findElement()

I am currently utilizing Selenium for testing my User Interface. My goal is to implement the @FindBy-Annotation in my code. The first snippet of code below works without any issues: @FindBy(how=How.XPATH, xpath ="//input[contains(@id,'idOfInputField')]") ...

Choose a button by using Selenium

Having trouble with clicking a button on a webpage I'm working on. The button's information in the inspection panel is as follows: <label class="btn btn-default col-md-6 ng-binding active btn-success" ng-class="{'btn-success active': pazi ...

Steps to obtain browser network logs with Python Selenium

Seeking assistance on retrieving browser network logs through Selenium for troubleshooting request/responses. Any guidance would be greatly appreciated. Currently utilizing Selenium 3.14.0 in conjunction with the most recent version of Chrome browser. ...

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

Tips for utilizing java.util.function within Fluentwait.until in selenium?

FluentWait<WebElement> wait2= new FluentWait<WebElement>(table) .withTimeout(10, TimeUnit.SECONDS) .pollingEvery(500, TimeUnit.MILLISECONDS) .ignoring(NoSuchElementException.class); wait2.until(new Functi ...

Navigating through table rows using Selenium WebDriver

Encountering a problem with Selenium in Java. The webpage structure is as follows: <html> <body> <div id='content'> <table class='matches'> <tr id='today_01'> <td class='team-a'>Real Madrid</td> <td class='sco ...

Selenium: The ultimate guide to inserting text within a div element located inside an iframe

Snippet of HTML code: <div class="listRte__editorFrame"> <iframe src="about:blank" style="height: 150px;"> #document <html> <head> <body> ...

Tackling the task of identifying elements using @FindBy when they possess multiple id values

Is it possible to declare page elements (mobile elements, using @FindBy or @AndroidFindBy) with two potential ids that will vary based on the app version being tested? One id is for the staging version and another for production, each slightly different - ...

Navigating through a series of URLs using Selenium

I am encountering difficulties with looping through a list of URLs using selenium. The problem seems to lie within the #Second Part section of my code. Currently, the length of the linklinkfin list is 9, but this number can fluctuate as more URLs are gathe ...

Is there a way for me to navigate back to the active driver window once my script has finished running?

Utilizing Selenium WebDriver alongside Chrome WebDriver, my script1 captures a URL from the driver.get(" ...") method and performs various tasks like web scraping (such as clicking buttons, extracting information, and logging into a website). Af ...

Using Python with Selenium to interact with a drop-down menu element within a

I am a beginner in the field of selenium and I'm stuck on how to select an item from a drop down menu. Despite my research efforts, I have not been able to find a solution. <div class="Select-value"> <span class="Select-value-label" role="option ...

Using Selenium in Python to extract information from a dynamic table with various dropdown menus

Recently, I've delved into the world of web scraping and am currently in the process of extracting data on various water utilities from a website. This site offers options to select different regions, and my goal is to output this information into a c ...

Reloading Web Page with WebDriver while Awaiting a Specific Condition

Is there a more elegant way to refresh a webpage during tests using Selenium2 instead of sending the F5 key? I am wondering if the driver has a method for refreshing the entire webpage. Here is my code: while(driver.findElements(By.xpath("//*[text() = 'RE ...

retrieve a compilation of all the events linked to a specific DOM element

When using Firefox, you can view events associated with each element in the Inspect Element of developers tools. https://i.stack.imgur.com/bKOK0.png I am looking to create a list of elements and their associated events automatically, ideally using seleniu ...

Encountering a java.lang.ExceptionInInitializerError when attempting to execute the Tests class due to an issue with cucumber.deps.com.thoughtworks.xstream.XStream.setup

Check out this dropbox link for further investigation. Encountered an issue while trying to run a test scenario in IntelliJ, resulting in java.lang.ExceptionInInitializerError at the first step. The StepDefinition class is provided below: package automatio ...

Guide on scraping at regular intervals using Python Selenium Chrome Driver

Scenario: I am facing a challenge with a website that requires me to scrape information from it at regular intervals. The site involves user input, so I opted to use Selenium for this task. The workflow is such that the user can interact with the web brows ...

What is the best way to export a table element into a CSV file or data frame using Selenium/BeautifulSoup?

Here is the structure of my code: from bs4 import BeautifulSoup import requests from selenium import webdriver import time from selenium.webdriver.common.keys import Keys from selenium.webdriver import ActionChains from selenium.webdriver.common.keys impo ...

Extracting the href attribute following a specific th element in a Wikipedia infobox using Python with the help of Selenium or lxml

I am facing an issue with extracting the href of a specific cell in the infobox on a Wikipedia page (refer to the image below). I am particularly interested in obtaining the href of 3M's official website located after the table's row header "Website". The ...

Searching for elements in Selenium based on their ending values is a common task. Learn how to locate elements by

Currently, I am facing a situation where each time I log in, a report is presented in a table that has a randomly generated ID with text at the end which always includes "table". To automate this table using Selenium Python web driver, one option is to us ...

Launching a hyperlink in a fresh tab

When using Selenium, I encountered an issue with opening a link in a new window. After some research, I came across the following two methods: 1) Actions act = new Actions(driver); act.contextClick(we).perform(); myWait(1000); // allow the menu to come u ...

org.openqa.selenium.WebDriverException: Element is not interactable

System Information: - Browser: Chrome Version 39.0.2171.95 - Driver: Chrome Driver 2.13 (Latest) - Automation Tool: Selenium WebDriver I am currently facing an issue where my script is unable to click on a b ...

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

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

Utilizing XPath with Selenium in VBA

In my search for a node based on text located within a child or grandchild node of its immediate sibling, I came across the following HTML structure: <div> <div class="searchedDivClass" id="DynamicId1"> </div> <div class=" ...

Retrieve the occurrence of a specific element by its position using Xpath with Selenium, all while implementing a wait feature

When scraping a large static web page with Selenium, it's crucial to ensure that the entire page is fully loaded before attempting to scrape it. To achieve this, I have implemented a solution where I wait for the last <a> element to be loaded on the ...

TimeoutException thrown by Selenium script during web scraping of Indeed platform

My current project involves creating a script to scrape job listings on Indeed, extracting information such as title, company, location, and job description. The script successfully retrieves data from the first five pages, but encounters an issue with o ...

Tips on waiting for a screenshot of a webpage to be captured using Selenium and PhantomJS in Python 3

Want to capture an image of a webpage, but need it to fully load (including AJAX) first. The delay time should be predetermined instead of being reliant on a specific element. The code below takes a screenshot without waiting: from selenium import webdr ...

Having difficulty accessing the VR Path Registry

Software Version: geckodriver-v0.20.0-win64 Operating System: Windows 10 Home Single Web Browser: Firefox: 59.0.2 (64-bits) Selenium Software: selenium-java-3.11.0 IDE: intelliJ Idea : 2018.1 Community Edition Greetings! I have recently started using We ...

Utilizing storeXpathCount function along with contains in xpath within Selenium IDE

Attempting to calculate the number of rows in a table that contain the value "ICETS" in the second column, using the following code: <tr> <td>storeXpathCount</td> <td>//table[@id='DataTables_Table_0']/tbody/tr[contains(td[2], " ...

Using Selenium to identify and recognize different color patterns

Is it feasible to use Selenium (preferably in combination with PHPUnit Selenium) to detect colors on a webpage? I have banners on my site, and some of them do not reload properly. It's strange because I can access their elements, but all I see on the ...

Troubleshooting Timeout Problems with Selebiun Crawler in C#

I am encountering an error while running the following code. public void GetCategoriesSelenium() { string javascript = System.IO.File.ReadAllText(@"GetCategory.js"); CrawlerWebSeleniumJS.ExecuteScript("var finished;"); ...

The Selenium test functions correctly in the production environment, however it encounters issues when run

I am facing an issue with my Vue.js application while writing Selenium tests. The test passes when run against the deployed production version of the app, but fails when run against a local version. When running the app locally, it is not from a build, bu ...

Breaking down objects and actions within the page object model with Selenium

Currently, I am involved in creating a selenium-based automation framework. As part of this project, I have developed a Dashboard page that consists of over 100 different web elements, each requiring specific actions to be performed on them. My question ...

Discovering the method to locate and interact with a concealed file upload field using Selenium WebDriver in

Here is the HTML code I am working with: <a id="buttonToUpload" class="btn-pink medium" href="#"> <span class="icon-arrow-right">upload photo</span> </a> <form id="form1" enctype="multipart/form-data"> <input id="u ...

Storing the URL of the current page in Chrome to a variable using Python

When using Selenium, I encountered a challenge on a specific page that was masking the real URL when I tried to use "driver.current_url". Instead of the actual link, it provided a generic URL. Feel free to test it yourself at: . Follow the Google Drive lin ...

ChromeDriver continuously launches multiple times

Whenever I run the test below, Chrome keeps launching multiple times which causes the test to fail. I have been debugging for the past two days without success. Could you please help me identify where I am going wrong? Any assistance would be greatly appre ...

mistake within the do while loop

public Login ClickGetStatus() { //IWebElement btnGetStatus = driver.FindElement(By.XPath("//*[contains(@id,'GetStatus')]")); do { buttonName_GetStatus[0] = "abc"; Thread.Sleep(3000); bool is_displayed = ...

Ways to implement a suggestion feature similar to Java in Eclipse using Ruby

Is it possible in Ruby Eclipse to have a similar feature as in Eclipse Java where all available methods and variables are displayed when typing "." for external library methods? ...

TeamCity Server experiences issues with WebDriver's ImplicitlyWait功能

In the process of developing functional tests with Selenium 2 framework on a Firefox 10 environment, we have encountered an issue with a special functionality: driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5)); We are attempting to set u ...

Using Selenium to handle asynchronous JavaScript requests

Having recently started working with Selenium and JavaScript callback functions, I've encountered a problem that I can't seem to solve on my own. My issue revolves around needing to retrieve a specific variable using JavaScript. When I manually i ...

Clicking the "OK" Button in an Alert Box with Python and Selenium: A Step-by-Step Guide

My goal is to interact with the "OK" button within a pop-up dialog https://i.stack.imgur.com/QFoLu.jpg I attempted the following code: driver.switchTo().alert().accept(); Unfortunately, this approach was unsuccessful ...

Searching for a specific text within an element using XPATH in C# with the Selenium framework

My current challenge involves locating specific text within certain elements on an HTML page. <a class="ProductCard-link ProductCard-content" target="_self" tabindex="0" href="/en/product/puma-future-rider-menshoes/314 ...

Discover the proper technique for clicking on a nested element using Watir

Having trouble selecting the option "Mr" from the dropdown list. I've attempted various methods without success. Even using xpath, which is normally reliable, has proven ineffective in this particular situation. $browser.element(:xpath, "/html/body/ ...

Obtaining the Id token bearer through selenium webdriver - a step-by-step guide

Is there a way to retrieve the id token bearer post-login using selenium webdriver or another framework? Any suggestions would be appreciated. Thank you! ...

Why is it necessary to set the implicit wait to 0 in Selenium WebDriver before utilizing the explicit wait feature?

What is the importance of setting implicit wait to 0 before using explicit wait in Selenium Web Driver? ...

Finding checkboxes that have the "checked" attribute: a simple guide

I'm working with a list of checkboxes and trying to identify the ones that have the "checked" attribute. Here's an example of what my checkbox element looks like: <input type="checkbox" class="u-display--inline-block u-margin-right--small" checked=""&g ...

Is there a way to utilize Selenium in Python to click on numeric buttons with the onclick event?

Here is the HTML code I am working with: <ul aria-hidden="false" aria-labelledby="resultsPerPage-button" id="resultsPerPage-menu" role="listbox" tabindex="0" class="ui-menu ui-corner-bottom ui-widget ui-widget-content" aria-activedescendant="ui-id-2" a ...