How can I extract the text "Home"? <li class="active"><a href="#">Home</a></li> I attempted to use the following code: element = self.browser.find_element_by_class_name('active') print element.find_element_by_tag_name(& ...
I am looking for a way to extract the redirected URL from an anchor tag without actually visiting it. I have tried using `selenium` `get_attribute('href')`, but all I get is "javascript: return false". Is there a method to obtain the redirected URL through ...
import pandas as pd import geocoder from selenium import webdriver import csv g = geocoder.ip('me') print(g.latlng) driver = webdriver.Chrome(executable_path=r'D:chromedriver.exe') driver.get("https://prisguiden.no/kategorier/mobiltelefon") variant = d ...
Equipment used: Raspberry Pi 4 Raspbian operating system chromium-driver version 72.0.3626.122-1~deb9u1 selenium version 3.141.0 Encountering an unusual behavior where using ActionChains(driver).send_keys(Keys.SPACE) in Chromium Browser results in the inp ...
Recently, I created a Python script that automatically logs into my email account and sends messages. It was working fine after testing, but then I decided to make some changes to simplify it - like adding one-liners and reducing the number of local variab ...
I am facing an issue where I need to send data in the request body from an external file within jmeter, but every time I attempt to do this, I receive an ERR in the response body. Below is my post method request body: ${__FileToString(/Users/public/${__eva ...
driver.findElement(By.xpath(".//*[@id='tbplayers']/tbody/tr[2]/td[3]")).click(); WebElement dragme = driver.findElement(By.xpath(".//*[@id='tbplayers']/tbody/tr[2]/td[3]")); WebElement drop = driver.findElement(By.xpath(".//*[@id='tbField']/tbody/tr/td" ...
I have written the following Python code to extract data from a PowerBI website: driver = webdriver.Firefox() driver.get("https://app.powerbi.com/view?r=eyJrIjoiZGYxNjYzNmUtOTlmZS00ODAxLWE1YTEtMjA0NjZhMzlmN2JmIiwidCI6IjljOWEzMGRlLWQ4ZDctNGFhNC05NjAwLTRiZT ...
I need to locate a specific piece of text on the page, and the only way I can do it is by using the className within the span tag. The problem is that this className is used for multiple other span tags as well. If I attempt to find the text through the cl ...
Why does my webdriver throw an exception when I try to switch to a frame(2) inside a frame(1) after using driver.switchTo.defaultContent()? Removing this line allows me to find the frame(2). Can someone clarify why this behavior occurs? driver.switchTo().d ...
My first time using Selenium and I'm struggling to locate my TextField element. I've tried using By.id("originTextField"), as well as the xPath and cssSelector provided by Chrome's dev tools. If anyone could provide an explanation, I would greatly appreci ...
There are some opinions online that suggest one must install Java, set JAVA_HOME, download Maven, set MAVEN_HOME, update PATH variables, etc. before starting to work with Eclipse and Selenium WebDriver. I have a few questions: 1) What happens if I do not ...
My setup involves two grids: I have a local grid setup where the hub and nodes run on my local machine, connected to network#1 Additionally, I have a VM grid setup where the hub and nodes are running in a virtual machine, connected to network#2 When ...
Trying to extract the source code of a webpage using Python has become quite challenging. Due to compatibility issues, I had to resort to Google Chrome 114 instead of the latest version 116. Even after creating and downloading my own version that should wo ...
I'm attempting to retrieve the website owner using my local whois with the following code: link = "ebdicorp.com.br" service = service.Service('C:\Selenium\chromedriver.exe') service.start() capabilities = {'chrome.binary' ...
Currently, I am working on a project using selenium and c#. One issue I am facing is that my tool runs very quickly without waiting for the element to be fully ready. Avoiding the use of Thread.Sleep() is recommended in this case. The specified wait time ...
Exploring a new challenge: simulating a cropping feature. I understand that replicating human cropping is impossible, but the image I intend to crop remains a fixed size each time I run the test. My goal is to establish the cropping WebElement at a constan ...
The buttons seem unresponsive agree_button = driver.find_element_by_xpath('//*[@id="rightsDeclaration"]') submit = driver.find_element_by_xpath('//*[@id="submit-work"]') def initiate_upload(): agree_button.click() time.sleep(1) s ...
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 have successfully written code that navigates to a specific URL and changes the country and currency. Now, I am looking to refactor my code for better organization and easier maintenance. Although I haven't used the page object model before, I have been ...
Currently, I am working on a function that accepts arguments and combines them to form a line for searching data in a JSON file. To accomplish this, I have initialized a variable for the readFileSync and then added the function's arguments to it in order t ...
Here is my code where I am attempting to create a function that includes a list to log into each email account one at a time. The issue I am facing is that it is trying to loop through the entire list instead of logging into one email at a time. How can I ...
Just started using the selenium framework and created a method to check for the presence of an element. Here is the method I came up with: public class WebUtlities { WebDriver driver; public void waitforElement(WebElement element) { W ...
On a dynamically created page, I have a list of different car types. I am looking for a way to locate specific elements by their text string and then click on the checkbox next to it. Double-clicking on the text should have the same effect. Currently, my ...
I am facing a situation where my website is hosted in two separate environments - internal and public. I need to ensure that the content displayed to the public is identical to what is shown in the internal environment. Are there any tools available for ...
While trying to run a Selenium test script on the Chrome browser, I encountered some problems. When Selenium tries to launch the Chrome browser, it opens up with a blank page and I also received a pop-up message saying that chromedriver.exe has stopped wor ...
Struggling with choosing options from a list drop down box in Selenium. Here's a snippet of the list box HTML and the Dropbox box: <li class="MuiButtonBase-root MuiListItem-root MuiMenuItem-root Mui-selected MuiMenuItem-gutters MuiListItem-gu ...
Is there a way to find an element on a web page using Selenium WebDriver with multiple locators simultaneously? I have two elements with the same ID but different values, so I need to combine both the ID and value in order to access them. What would be t ...
I am currently in the process of automating a webpage built with Angular that features an auto-complete dropdown with numerous elements. My goal is to click on each individual element and verify if it populates all the fields below accordingly. Below is th ...
My current project involves extracting information from LinkedIn using Selenium in Python. I understand that LinkedIn has strict anti-scraping measures in place to prevent unauthorized data collection, which could result in blocked accounts and IPs. I'm ...
Hey there! I'm currently working on scraping a website and initially used Bs4 to extract certain elements like sector and name. However, I'm facing difficulty in retrieving the financial data using it. In the page source below, the "-" should be ...
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time PATH = "/Users/khizarm/Downloads/chromedriver" chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("--incognito") drive ...
I encountered an error while attempting to execute this example, despite trying both ActionSequence and LegacyActionSequence. I am in search of the correct method to chain actions. My attempts to find a solution in resources such as https://seleniumhq.git ...
I recently developed a bulk WhatsApp message sender application that allows for sending multi-line text messages. However, I encountered an issue on WhatsApp web where pressing enter sends the message right away. My goal is to have it press shift + enter ...
After dedicating a significant amount of time to research without finding a suitable solution, I turned to StackOverflow for help. I have been using Selenium Webdriver to automate testing on various browsers. However, recently I encountered issues with ol ...
//Custom TestNG Class for XCart Checkout public class XCartCheckout extends TestBase { public static WebDriver driver; StoreHomePage home; // ArrayList<String> productname = new ArrayList<String>(); @Test(dataProvider = "DataFrom ...
I am encountering difficulties with the geckodriver. When I run the following code, I receive the error message "SessionNotCreatedException: Message: Error: NS_BINDING_ABORTED". The issue seems to be arising from the line where I call "driver = webdriver.F ...
In my work with Selenium web driver, I have crafted a series of codes in Eclipse to test different features of a web application. My aim is to execute them sequentially without combining them into one code using the '@Beforetest' and '@After ...
As a beginner in Selenium, I successfully launched a website using the following Node.js code snippet: var webdriver = require('selenium-webdriver'); var driver = new webdriver.Builder() .forBrowser('chrome') .build(); console ...
I need assistance converting the code below from MSTest V2 to NUnit 3. Can someone help me identify the alternatives for CurrentTestOutcome and UnitTestOutcome in NUnit? var status = MyTestContext.CurrentTestOutcome; switch (status) { case UnitTestOu ...
Has anyone experienced issues with logging into Instagram using an automate tab? Previously, I didn't have any problems, but now it seems that Instagram is not allowing users to log in through automation. An error message stating the following appears: T ...
My objective is to extract movie genres from the IMDB website through a different platform. The main page I am working with is: driver.get("https://sfy.ru/scripts") # main website Please note that you may encounter a "certificate is not v ...
My goal is to populate cells in a table with the monthly activity data of GitHub users, organized by years and months (e.g., 2021_01, 2022_10). https://i.stack.imgur.com/BGwfx.jpg The Xpath for this information can be found here: //*[@id="js-contrib ...
I am working on an automation framework using webdriver.io v5. I need to receive a boolean response from the code snippet below: waitAndCheckForContactToBePresent(contactName) { return browser.waitUntil((value) => { return this.chec ...
Looking to integrate e2e tests into our CI build process, I have successfully added them for Chrome and Firefox. However, I want to include tests for various versions of Internet Explorer as well. How can this be accomplished in the build process on Linux/ ...
<div class="medium-widget event-widget last"> <div class="shrubbery"> <h2 class="widget-title"> <span aria-hidden="true" class="icon-calendar"></span>Up ...
I'm currently attempting to click a primefaces select boolean checkbox using the ID, but I'm encountering an issue. The exception message states: org.openqa.selenium.NoSuchElementException: Cannot locate an element using By.id: runDARtest1 I&ap ...
I am working with a collection of elements using find_elements_by_css_selector, and my next task is to extract their css locators. I attempted the following approach: foo.get_property('css_selector') However, it seems to be returning None. ...
Embarking on my Protractor and Javascript journey, I am faced with the challenge of writing a test script to retrieve values of various accounts under the header "Revenue" (as shown in the image below). My task involves extracting all number values listed ...
Unable to locate the specified element The code was created using Python with Visual Studio Code from time import time import time from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By ...
HTML code <div class="modal-footer slds-modal__footer" data-aura-rendered-by="2805:0"> <div class="rssDialogText grantAccessCheckbox packagingSetupUIRssDialogFooter" data-aura-rendered-by="2595:0" data-aura-class="packagingSetupUIRssDialogFooter" ...
Error is: TypeError: __init__() got multiple values for argument 'executable_path' I'm having trouble pinpointing the issue. chrome_options = Options() #line 8 chrome_options.add_argument('--headless') #line 9 chrome_options.add_argument('--no-sandbox') ...
Why is the loop not functioning correctly after opening the initial element based on the xpath? I keep receiving the following exception: raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: Una ...
Is there a way to display the Visible Text of all checkboxes on a webpage using Selenium with Java? ...
I attempted to find a solution on this website because there is a question that closely resembles mine. Unfortunately, the suggested solution did not resolve my issue. Below is the current code I am working with... Is it feasible to initiate the webdriver ...
Is there a method available to resize two windows to half of the screen size with Selenium? If not, any alternative suggestions are welcome. I am currently working with Python and Chromium, but willing to consider other options. ...
I tried searching by class name but had no luck: from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC button_loc ...
I have developed a basic Angular portal page. The main feature is a search bar where users can enter the name of an NBA team like "Chicago Bulls", "Indiana Pacers", etc. Upon submitting the team name, users are directed to a second page where they can view ...
Hey there, I'm currently working on using C# Selenium to extract the title of a YouTube video. Unfortunately, the methods I've tried so far haven't been successful. I've already tested getting the text from other elements and it works f ...
I am trying to activate the function cmd('abcdef:perxform',{'id':'5'},true). html code ---> <div class="abcdef_button_small" onclick="if (!check_health(1,3)) return; if (!check_timers(1,$(this))) return ...
Can someone help me write an XPath for the 'Yes' label in green color on the UI image? I am new to automation and would appreciate any assistance. Below is my HTML code and UI snapshot: https://i.stack.imgur.com/affN5.png https://i.stack.imgur. ...
I am facing an issue with the following code where I need to select a radio button based on the label of the button next to it: <div class="formclassname"> <input name="radiobutton" type="radio" class="classname& ...
Is there a method in Selenium Java to enable the Pop-ups and redirection settings in Chrome? ...
I have successfully developed a Python script using Selenium to extract phone numbers from a website. The process involves entering city names into a search box and hitting the search button. I tested it with "Miami" as the city name, but encountered an is ...
I am currently working on automating my tests using web driver, testng, and the page factory. However, I have encountered a null pointer exception while executing the code provided below. HomePage Page Object Class This is the page factory class. packag ...
Currently, I am hardcoding currency values like USD and CAD to perform assertions on the type of currency I receive from the application response. While using an XML file to store all currency types for comparison is possible, it seems like overkill for ju ...
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 ...
Can you explain the distinction between isDisplayed() and isVisible() functions in Selenium? These two methods are commonly employed to determine whether a web element is hidden on a webpage or not. ...
Hello, I am attempting to execute a Python script on an Apache2 server running Ubuntu. Below is the configuration of the server taken from the file 000-default.conf: <Directory /usr/lib/cgi-bin/> Options Indexes FollowSymLinks ExecCGI AddHand ...
I am using a WebDriver through Selenium to automate opening a browser, directing it to an IP address, performing various tasks, and then closing it. My goal is to track all URLs accessed during this process. This includes any ads that are displayed, CSS c ...
I am facing an issue with my script. The code between the specified problem-comments is not executing as expected. This script is designed to log into the Yandex-mail page (), locate the search-field for mails using XPath, click on it, and input the text " ...
Trying to access the inspect element feature in a Chrome browser for a project, but encountering difficulties. Attempting to use F12 or Control+Shift+i does not yield any results: action = ActionChains(driver) action.send_keys(Keys.F12) action.perform() A ...
I have been trying to make this code work recently but I am facing some difficulties. It seems like my code is not functioning properly. Here is the code snippet that I have experimented with for Button::before... The send button should only appear when I ...
I'm facing a challenge where I am attempting to extract the value of an HTML attribute and store it in a variable named url_extension. However, instead of getting the desired value, I keep receiving a Promise object. Below is my code snippet: (Please ...
Currently, I am using the selenium webdriver for node.js and loading an extension. The loading of the extension goes smoothly; however, when I run my project, it directs to the desired page but immediately the extension opens a new tab with a message (Than ...