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.

Encountering a problem when executing the mobile automation script using Appium

Encountering an issue while running my automation script with Appium. I'm executing a mobile automation script on a Windows Desktop machine with the following software setup: Software Set-Up: 1. Android Studio 2. Appium 3. Mobile/Tablet connected ...

Element cannot be located using XPath Selector for a text type without a corresponding name or Id

Browser Inspection Tool https://i.stack.imgur.com/jsOeJ.png An Example in C# IWebElement Search = driver.FindElement(By.XPath("//*[@placeholder='search' and @type='text']")); Actions actions_Search = new Actions ...

What is the best way to interact with a html element using the onclick event in Selenium?

Struggling to find the xpath for a link on a webpage. The HTML code for the link is as follows: <td style="width: 50%; text-align: right; vertical-align: middle"> <img id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl00_AddRecord1" ...

Retrieve the browser version through the use of the Selenium WebDriver

Is there a way to retrieve the browser version? >>> from selenium import webdriver >>> driver = webdriver.Chrome() >>> print(version) <-- Any suggestions on how to accomplish this? Chrome 92.0 ...

Issue encountered: Module 'jasmine-expect' not found [Protractor]

I am facing an issue while trying to execute a protractor test that connects to my application. Upon running the command (git bash/terminal): protractor conf.js An error is displayed as follows: " Error: Cannot find module 'jasmine-expect&apo ...

What is the process for obtaining the most recent stock price through Fidelity's screening tool?

Trying to extract the latest stock price using Fidelity's screener. For instance, the current market value of AAPL stands at $165.02, accessible via this link. Upon inspecting the webpage, the price is displayed within this tag: <div _ngcontent-cx ...

locate the desired element using the xpath of its sibling

Is there a way to target the element following '>' using xpath without referencing its text content? Specifically, I am looking for just the element "n" in my case. driver.find_element_by_xpath('//div/div/*[contains(text(),">")]/precedin ...

Guide on capturing a screenshot of a specific WebElement on a webpage using Selenium without capturing the entire page or screen

Can someone help me with capturing a specific image of a website instead of the entire screen? I tried using the code below to capture the screenshot, but it ends up capturing the entire screen which doesn't solve my problem. WebDriver driver = new F ...

python utilizing selenium for scraping data from multiple href links

Click this link to test it out: I've been able to extract the links for all product detail pages, but I'm only getting one result at the end. It should be going through all the links and extracting the names and image URLs. What am I missing her ...

My code is encountering the issue of "element click intercepted" when not using WebDriverWait. On the other hand, when utilizing WebDriverWait, the error message states that 'None

Code Proposal: To simplify the process of gathering links to all games on a given day from the page , I am looking to create a script that allows me to dynamically change the date, such as 2021/08/01 or any other date. This way, I can easily loop through ...

Changing the file download location in Webdriver when utilizing either the Chrome driver or Firefox driver

I'm currently facing an issue with saving an image in a specific folder using the "save as" option. I've figured out how to right click on the image and select the "save as" option, but I'm struggling when it comes to choosing the desired location in the o ...

Is it possible to pass values using sendkeys in Selenium in order to select an item from a Bootstrap dropdown menu?

Is there a way to pass values for a bootstrap drop down menu using Selenium instead of selecting them? Can we use sendKeys in Selenium to achieve this? I need to input values CSS, HTML, JavaScript without manually selecting them during automation. <d ...

Having trouble setting the select value with JavaScript in the Selenium web driver

I am working on a web page that includes a cascaded dropdown feature. The data in the second dropdown appears to be generated via ajax based on the selection made in the first dropdown. Here is the code for the first select option: <select class="form- ...

Jenkins is experiencing issues running Selenium scripts on Chrome and Firefox

My configuration includes the Selenium webdriver, along with TESTNG and Maven. I have successfully run tests on IE, Chrome, and Firefox from Eclipse. However, when I attempt to schedule these tests using Jenkins, they only work on IE and fail on Chrome an ...

Using JavaScript to set attribute values in Python Selenium, these values are cleared after each update

Assuming : for i in list('{}'.format(value)): self.browser.execute_script( "arguments[0].setAttribute('value', '{}');".format(i.replace('&b ...

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

Utilizing SelenuimBase to fetch a Tableau dashboard for downloading

I have been working on a script to automate the download of my Tableau Public visualization for a project. However, I am facing issues after clicking on the download button. from seleniumbase import BaseCase import pyautogui class Test(BaseCase): def test ...

Selenium - incapability to select the subsequent page

I'm experiencing difficulties with clicking the next button (>) and repeating this process until reaching the last page. Despite researching similar issues, I have been unable to identify what's causing my code to malfunction. Below is the co ...

Automate downloading files from Internet Explorer and saving them to a specified directory using AutoIT

I am facing a requirement to download a file from Internet Explorer 11 and save it to a specific location using Selenium and AutoIT. The path where the file should be saved is provided through the command line. Below is the code I have implemented: ; Get ...

What is the best way to access the statistics for each game on a live score platform?

I am looking to retrieve the statistics for each game on livescore and gather all the stats of all games in a day simultaneously. driver.get('https://www.livescore.com/en/football/2022-12-01/') time.sleep(2) scroll_pause_time = 1 # You can adjust ...

Using Selenium and Python to scrape text from a continuously refreshing webpage after each scroll

Currently, I am utilizing Selenium/python to automatically scroll down a social media platform and extract posts. At the moment, I am gathering all the text in one go after scrolling a set number of times (see code below), but my objective is to only gathe ...

To access the website https://gem.gov.in/ using Python Selenium and undetected_chromedriver, follow these steps:

I'm facing a challenge in trying to access the website using Python Selenium. My initial attempt was: import undetected_chromedriver as uc import time driver = uc.Chrome(use_subprocess=True) driver.get('https://gem.gov.in/view_contracts') time.sleep(5) ...

Choose multiple frames simultaneously with Selenium

While some may consider this a foolish inquiry, it holds great significance for me. I am well-versed in switching frames using Selenium WebDriver. But I'm curious - is there a method to download the page source of the entire page with all its frames simu ...

Issue with custom profile selection and Selenium headless compatibility

Here is the code snippet I am currently using - and yes, I have tried to keep it short and concise. import selenium from selenium import webdriver from selenium.webdriver.chrome.options import Options import bs4 options=Options() #options.add_argument(& ...

Is there a way to verify the status of a checkbox in Selenium using Python?

When attempting to determine the status of a checkbox using a method that returns a boolean value, I am encountering a problem where it always returns false regardless of whether the checkbox is checked or unchecked. def checkbox_status(self): ch ...

Steps for bypassing the authentication popup in Chrome browser during the execution of a Selenium script

click here for image descriptionWhen I try to log in with the first URL (as shown in the image), it takes me to another URL where I have to input my credentials. However, before reaching that page, a browser-generated pop-up appears that cannot be located ...

What are the advantages of using Selenium Edgedriver's Send Keys to select all and copy text?

Being a novice to using Selenium, I'm exploring this auxiliary library for the first time in VBA. I've opted to use the Web Driver for Microsoft Edge, and I'm encountering challenges with implementing send keys. Specifically, I am trying to select the ent ...

Tips for grabbing the following element locator path with Selenium?

I am working on a piece of code to download a CSV file. Here is the code snippet: chromedriver = "/usr/lib/chromium-browser/chromedriver" driver = webdriver.Chrome(chromedriver) driver.get('https://www.aemo.com.au/Electricity/National-Electricity-Mar ...

Concealing Command Prompt Output with PowerShell and Selenium

Currently, I am utilizing Selenium in conjunction with PowerShell to launch a dashboard display using Internet Explorer on a large office monitor. The process is initiated as follows: $seleniumOptions = New-Object OpenQA.Selenium.IE.InternetExplorerOption ...

What is the best way to increase the index by 1 with each iteration of the loop?

I am trying to figure out how to increment the index by 1 each time a loop runs, but I seem to be struggling with it. Here is the current piece of code that I have: categoryindex = categorylist[1] while True: try: ignored_exceptions = (NoSuch ...

Is it necessary to hover over the menu in order to access the clickable element?

Be sure to hover over the menu first before trying to click on the element! The element is currently not visible and cannot be interacted with (WARNING: The server did not provide any stacktrace information) error on Selenium I have attempted the followi ...

Counting the occurrences of a text in a webpage using Selenium WebDriver

Hey there! I'm trying to figure out how many times the text "VIM LIQUID MARATHI" appears on a specific page using selenium webdriver in Java. Can anyone assist me with this? In my main class, I've used the following code snippet to check if the text exist ...

Having difficulty choosing an element with protractor's virtual repeat functionality

Initially, I successfully used ng-repeat to select an element. However, the developers have since implemented virtual repeat which has caused the following code to stop working: expect(stores.listStores(0).getText()).toContain('Prahran'); expect(element.a ...

Automating the process of locating web elements for Selenium using code

My Journey with Selenium As a newcomer to Selenium, I am eager to learn and explore its capabilities in order to potentially take on testing projects at my company. After conducting research, I discovered that one of the main challenges for web testers us ...

Using ChromeOptions to Manage Webdriver Execution

I encountered a problem in Chrome where I received an error message "You Are Using An Unsupported Command-Line Flag –Ignore-Certificate-Errors. Stability And Security Will Suffer." when running my Selenium code as shown below. Public Sub key() Dim sel ...

What is the method for launching Chrome synchronously in Selenium WebDriver using createSession()?

After executing the code below using Selenium WebDriver to launch a Chrome browser: import { Driver } from 'selenium-webdriver/chrome'; Driver.createSession(); console.log("I've launched!"); I'm encountering an issue where "I've launched" is displayed i ...

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

Verify that the option is present in the dropdown menu

My dropdown menu contains a list of subjects. To retrieve the values from the dropdown, I used the following code snippet: IList<IWebElement> allOptions = check.Options; Next, I created an array of strings to hold the subject names that I need to ...

I am struggling to decipher the source code of the IOS driver page

After obtaining the page source with the following code: String pageSource = driver.getPageSource(); I now want to save this XML file locally in the cache. To achieve this, I need to extract element attributes like the values of x and y attributes instea ...

Encountering a Selenium webdriver exception specific to Internet Explorer while using Python

My Python code is presented below: from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait print("browser1 ") browser = webdriver.Ie('C:Program Files (x86)Internet Exploreriexplore.exe') print("browser2 ") An exception ...

Selenium error message related to character encoding in UTF-8

I am trying to access all correios agency information in Brazil by web scraping using Selenium. However, I am encountering some issues with utf-8 encoding in my code. How can I resolve this and set everything to utf-8 format? Here is the code snippet I am ...

What is the best way to download multiple files using Capybara and Selenium in Chrome?

Currently using Capybara in conjunction with Chrome and Selenium. When attempting to click on a link that results in an automatic download, the file is downloaded successfully for the first time. However, subsequent attempts trigger a prompt from Chrome st ...

Keep an ongoing watch on the presence of a xpath that may become visible at any point on a website

I am currently using a java program to execute selenium tests. However, I am facing an issue where during the midst of the run, there is a possibility that a web message containing the xpath may or may not appear: //*[@id='toast-container'] If this spec ...

Exploring ways to interact with Span elements using Selenium in Python

Greetings! I am currently attempting to access a specific element called span. My goal is to retrieve this element in a manner that allows me to append it to a list. Each span contains an attribute wordnr="1" or a different number. The objective is to extr ...

Bypass the entire test suite in the event of a failed assertion in any individual test

JUnit.xml :: <suite name="Suite" maintain-order="true" parallel="false" verbose="1"> <test name="TestCases" maintain-order="true"> <classes> <class name="functionalTests.FunctionalTestCase01"> ...

Unable to locate and interact with a specific element within a dropdown menu while utilizing Protractor

I am currently facing an issue with selecting a checkbox from a dropdown in jq widgets. The code seems to work fine when the element is visible on the screen, but fails otherwise. I have tried various methods such as executeScript and scrollIntoView to bri ...

Can you suggest a different method for performing a mouse hover action on a selenium web element using Java 1.8, Gecko Driver 0.19, and Firefox 56?

I encountered an issue where using Actions resulted in an unsupportedCommandException. I attempted the following: Actions action = new Actions(driver); action.moveToElement(element).build().perform(); driver.findElement(By.linkText("All Actions")).click( ...

I encountered an issue with Robot framework where it was unable to retrieve the locator. Despite attempting to copy the xpath, I continued to receive the error message stating "unable to find the locator."

Here are the elements I am currently working on automating an application using Robot framework, Selenium in PyCharm tool. As part of this process, I attempted to define a keyword to click on a sidebar entity named "GCC Intelligence", but encountered the ...

Finding an element with Python and Selenium by accessing innerHTML

I am currently navigating my way through Selenium and attempting to create my inaugural script using the Python package. My setup includes: Operating System: Windows 10 Python Version: 3.10.5 Selenium Version: 4.3.0 Up until now, I have managed to accom ...

Transferring content from a div class to an input class

I am seeking help to extract text from a div class and transfer it to an input class. Here is the code I have written: import os import time from selenium import webdriver from pyvirtualdisplay import Display from selenium.webdriver.common.by import By fr ...

Looking to extract the value of the text tag "147" from the given DOM structure using Selenium? Here's how you can do it

The following code snippet can be found within an element with the id: { <text class="donutChartText" text-anchor="middle" x="0" y="16" fill="#78a22f" style="fill: rgb(120, 162, 47); font-family: openssanslight; font-size: 55px; opacit ...

Utilize the second browser that is currently open for better productivity

Just started using selenium and faced with an issue. I am currently dealing with a form where clicking "Report" opens a new browser window displaying some data. I need to interact with this data. How can I retrieve and validate the displayed information? ...

selenium.common.exceptions.InvalidArgumentException: Message: The argument provided is not valid: 'name' must be a string when transitioning between window handles using Selenium

Whenever I try to use the following code snippet: driver.execute_script("window.open('');") driver.switch_to.window(driver.window_handles[1]) driver.get(url) driver.switch_to.window(driver.window_handles[0]) An error is thrown at me. selenium.co ...

Error in Java - selenium code: "variable cannot be resolved"

After implementing the following code: mainWindowHandle = driver.getWindowHandle(); wait = new WebDriverWait(driver, Long.parseLong(getData("WaitTime"))); I encountered a compilation issue indicating: 1) mainWindowHandle cannot be resolved to a variabl ...

Trigger an Onclick Event in Selenium

I am attempting to click on a menu icon with the following HTML code <a href="#" class="ctm-icon-link" onclick="show_menu('doc_107094', 1); return false;"><i class="icon-left-space icon-chevron-sign-down">&nbsp;</i></a& ...

Navigating through the cookie clutter: The ultimate guide to clearing Internet Explorer cookies for Selenium automation

Our automation process involves using the IE browser with Selenium webdriver. To ensure that our test cases start from page 1, we need to clear the cookies from the Registry beforehand. Can you assist me in accomplishing this task? ...

Looking to confirm the contents of a text box?

In need of assistance to assert a value that appears in the text field labeled blNo. Struggling with using a proper assert method, any suggestions would be greatly appreciated. ...

I'm struggling with a Python Bot issue, as it seems the driver is not being acknowledged

I'm encountering an error with my code while trying to run a WhatsApp bot. Can anyone help me figure out why this error is occurring? Here is the error message that I am getting: Error: Traceback (most recent call last): File "C:\Users&bs ...

I must interact with the video within the iframe by clicking on it

I am trying to interact with an iframe video on a webpage. Here is the code snippet for the video: <div class="videoWrapper" style="" xpath="1"> <iframe width="854" height="480" src="xxxxxxx" frameborder="0" allow="autoplay; encrypted-media" all ...

What is the best method for creating a Selenium locator for the element provided?

I'm working on creating an Xpath to target and click on a specific radioButton. Take a look at the element and Xpath below: Xpath: /html/body/div[3]/div[2]/form/table/tbody/tr[5]/td[2]/label[1]/input Element: <input type="radio" ng-model="dat ...

Python selenium WebDriver: error with list index exceeding bounds

I am encountering an issue with the code below while trying to scroll down a website using JavaScript enabled. The problem arises when the newHeight value reaches approximately 229275, at this point I receive an "list out of range" error on line browser.fi ...

How can you effectively manage a Windows pop-up for downloading files and save them using Selenium and Java?

public static FirefoxProfile customFirefoxDriverProfile() throws Exception { FirefoxProfile profile = new FirefoxProfile(); profile.setPreference("browser.download.folderList", 2); profile.setPreference("browser.download.manager.showWhenStartin ...

Trying to validate HTML5 using Selenium with Python? Here's how to do it

I am currently attempting to validate a specific input field, which can be found at the following link: https://groups.google.com/forum/#!topic/webdriver/sUy6IKpQsHw. Although this link is not my own creation, I am interested in validating the text "Please ...

what is the best method to locate a parent element containing a particular child using By.xpath()?

In the past few days, I've been utilizing the selenium-webdriver in nodejs for web scraping. However, I am facing an issue on how to locate an element that contains a specific child element. I have attempted to use the following operator but it does not y ...

Tips for Troubleshooting Selenium Using Python

I'm encountering a problem where Selenium is not performing as intended. In my Python script, I locate an element by its id. If the node is visible, I proceed to click on it and capture a screenshot. However, the current behavior is unexpected. Selenium s ...

ChromeDriver initialized by Selenium remains active in the background

Having trouble completely deleting a project due to the chromedriver instance running in the background despite no code execution. Please refer to the image linked below: https://i.stack.imgur.com/bt1Tb.png Error encountered during project deletion:https: ...

Fields are unable to process the input provided

While testing my website's cart functionality, I encountered an issue with inputting data into the Debit card fields after selecting the Payment method. How can I successfully enter data into these fields? You can access the Website to be tested via this ...

Retrieving text from a collection of Web Elements can be time-consuming

I have written a code to extract data from a web table, where each row is read as text and added to another list before being sent to a method for writing to an excel file. However, this process of reading approximately 200 rows and writing the data to a n ...

Choosing Frames within node.js

I am facing an issue with switching to nested frames in selenium-webdriver using node.js. Despite trying various approaches such as setting timeouts for page loading and frame switching, I am still encountering a NoSuchFrameError. This problem seems to be ...

What could be the reason behind the click method not functioning properly in Python Selenium?

Having trouble with the click() method in Selenium Python? Despite searching through all available methods in the Selenium documentation, I am struggling to automate tasks on this specific URL. from selenium.webdriver.common.by import By from selenium im ...

Discovering a moving element and inputting text using Selenium with C#

UPDATE: I'm not entirely certain if this detail will help, but the platform is Sharepoint-based. I am encountering difficulty in locating an element with a special character using Webdriver. var element = wait.Until(x => x.FindElement(By.Id("Tasrit_6a ...

How to choose a value from an auto complete dropdown using Selenium?

<div class="cityLocaDiv1 col-lg-12 col-md-12 col-sm-12 col-xs-12"> <input class="form-control" id="city-locality1" placeholder="Enter City or Locality" type="text"> <span class="glyphicon glyphicon-chevron-down cityicon1" style="positi ...

What is the reason for Selenium's @FindBy method not functioning properly with name, xpath, and css selectors?

Having trouble using @FindBy() in my Java program with Selenium. The program consists of multiple lines and I'm looking to share tasks between classes, starting with identity verification. I've created a class that includes login credentials for username a ...

Should I simply open the URL or navigate to a page when creating end-to-end selenium tests?

Suppose I want to enroll in a class on the 'Courses' page. I am testing the functionality of enrolling in classes. Should I access the page by clicking on the menu bar, or should I directly enter the URL of the page? ...

Ways to verify if certain text information is present on the webpage

Is there a specific way to determine if certain texts are present on a webpage? It would be ideal to check multiple texts at once. For instance, checking for "client", "customer", and "order" in the page content. Below is an example of the HTML code snip ...