Selenium, how to start Firefox with addons?

I want to load the Firefox Addon RequestPolicy. This is how i tried it: rp = open(wd + "/requestpolicy.xpi") firefoxProfile = FirefoxProfile() firefoxProfile.add_extension(rp) self.driver =...

How do I enable geolocation support in chromedriver?

I need to test a JS geolocation functionality with Selenium and I am using chromedriver to run the test on the latest Chrome. The problem is now that Chrome prompts me to enable Geolocation during...

Selenium - How to count the number of rows in a table?

I have a table with "n" number of rows. I need to count them, how to do? Example:- My table looks like the below entry. Type Balance Date received Date returned Payment method...

Selenium: Scroll till end of the page

Selenium: I am new to WebDriverJS. I have tried this approach in Java. Long repaeted = 0l, scrollHeight = 0l, returnHeight = 0l; while(true){ if (repaeted == 0) { returnHeight = (Long)...

Webdriver.io - how to use beforeEach hooks in the config

I am building an app using the MEAN stack and Webdriver for testing. At the moment I am cleaning the database between tests by using Mocha's beforeEach and afterEach hooks, e.g.: describe('Links',...

Python - Select "Save link as" and save a file using Selenium

Newbie: There are different files on a webpage, which can be downloaded as follows: Right click on a file link Select "Save link as" Click "Save" button on the new window. I tried the following...

How to use Selenium Webdriver on Heroku?

I am developing a Node.js app, and I use Selenium Webdriver on it for scraping purposes. However, when I deploy on Heroku, Selenium doesn't work. How can I make Selenium work on Heroku?

equals() doesn't work as expected with Selenium

I am trying to compare current URL with a string URL, but the following code returns false. driver.get("https://www.facebook.com"); ...

How To Run Selenium With Chrome In Docker

I installed google-chrome in a Docker, but when I run my Python 2 script of Selenium, it failed like this: [email protected]:/topology-editor/test$ python test.py Traceback (most recent call...

Django : Connection refused to live_server_url

I'm using docker, selenium, and Django. I just realised i was doing my tests on my production database ; while i wanted to test on StaticLiveServerTestCase self-generated database. I tried to...

How to access multiple id elements in serenity-js

I have 5 links with the same name and id and linktext. I am using serenity-js. how can I access the 4th link page.ts has static link = Target.the('click the 4th link').located(by.linktext('link'));

How to use Chrome Profile in Selenium Webdriver Python 3

So whenever I try to use my Chrome settings (the settings I use in the default browser) by adding options = webdriver.ChromeOptions() options.add_argument("user-data-dir=C:\Users\... (my webdriver...

Selenium: WebDriverException:Chrome failed to start: crashed as google-chrome is no longer running so ChromeDriver is assuming that Chrome has crashed

Recently I switched computers and since then I can't launch chrome with selenium. I've also tried Firefox but the browser instance just doesn't launch. from selenium import webdriver d =...

PHP Selenium Blocked by CORS Policy

I am trying to access a website with selenium and i am getting below error And i used the following code i have tried header('Access-Control-Allow-Origin: *'); but did't work for me require_once...

How to search and play a video on YouTube using Selenium in Python?

I want to search and play a video using Selenium in Python. Here is the code: import time from selenium import webdriver from selenium.webdriver.common.by import By from...

'Error: java: cannot access java.util.function.Function' - while trying to use WebDriverWait

I'm using Maven and Intellij, project set for jdk-12.0.2, maven in pom 1.8 and when trying to run this code : WebDriverWait wait = new WebDriverWait(driver, 5); WebElement el = ...

How to run Selenium-Webdriver on Heroku with node.js (Firefox or Chrome)

I want to use Selenium on Heroku with Firefox or another browser that is able to display videos. Unfortunately, PhantomJS doesn't work because the browser can't play video. I already tried it...

How to set mock Geolocation Long/Lat in Python/Chromedriver/Selenium

I'm running Python/Chromedriver/GoogleChrome/Selenium headless on python, and I am having some trouble figuring out how to set a custom geolocation long / lat programmatically; the following code...

How to upload a file in popup using Selenium remote webdriver on linux machine

I have to automate an application and am working on Windows machine. On clicking some button, window popup opens where I can choose a file or enter the path. Upload functionality is working fine...

How to execute Javascript with Codeception and get the returned values

Is there any way of making this work ? $I->amOnPage('/'); $I->wait(2); $I->executeJS(' var theCookies = document.cookie.split(\';\'); var aString = \'\'; for...

RSelenium: configure firefox remotedriver to use Tor network

I am trying to use RSelenium with firefox using a local proxy (Tor) on a linux machine. I had no problem in installing Tor following this tuto, and the command line wget -qO -...

Is there a way to use selenium in combination with the Opera GX Browser?

I'm trying to get the current page url on my Opera GX browser, but I can't find if there is a way to do it. I thought selenium might work, but when I run my code, it gives me this in the command...

How to bypass human verification 'press and hold' using Selenium in Python?

I am trying to scrape some product reviews using Selenium and Python from this site but it connects another site and shows a popup at any point randomly, where I need to press and hold the button...

problem while trying to find iframe with selenium

I have a few iframe present on the page, inside one of iframe we have div with captcha I need to switch to iframe to solve the captcha Trying to find all iframes on the...

Minimal working press and hold example in Selenium

https://stackoverflow.com/questions/68636955/how-to-long-press-press-and-hold-mouse-left-key-using-only-selenium-in-python I am trying the answer by zirene-nguyễn in the above page. But it does...

Getting NoClassDefFoundError while running my Cucumber Automation

I am facing the following issue while running my automation. This is what I am getting on the console. io.cucumber.core.exception.CucumberException: java.lang.NoClassDefFoundError:...

Python Webdrivermanager .install() does not work for edge in custom webdriver installation location

I use Webdrivermanager to update my drivers. But for the Edge browser I get errors. elif preferred_browser == "Edge": service =...

AttributeError: 'dict' object has no attribute 'click' error with find_element_by_css_selector() and click() using Selenium and ChromeDriver

I want to use the click command on my test page. But I'm getting the below error. I've written it in python from selenium import webdriver from selenium.webdriver.common.action_chains import...

Open Chrome with Rails Feature Spec using Docker

I can't figure out how to make the feature specs work when running non-headless feature specs for Rails in Docker. I can get the Chrome to open, but I'm getting ERR_EMPTY_RESPONSE (basically,...

Python/Selenium web scrap how to find hidden src value from a links?

Scrapping links should be a simple feat, usually just grabbing the src value of the a tag. I recently came across this website (https://sunteccity.com.sg/promotions) where the href value of a tags...