r/selenium • • Jan 28 '19

11 Reasons To Use Selenium for Automation Testing

0 Upvotes

When we talk about automation testing, Selenium always finds its way to the conversation. Being one of the best tools for automation testing, Selenium is well loved by developers and testers across the globe. But the question that remains is that there are many automation testing tools available in the market that delivers almost the same results. So, why only Selenium?

Well, this is something that we are going to discuss in detail in the article. By the end of the article, you will be able to list out all the benefits of performing automation testing using Selenium and why is it preferred over other automation testing tools.

https://dzone.com/articles/11-reasons-why-go-for-automation-testing-using-sel


r/selenium • • Mar 19 '25

how do i sell a subscription of a selenium script

0 Upvotes

this might come off as a really stupid question

but how do you actually sell a subscription of a selenium script,

like it requires a little USER input in the browser - just a bit, and the user should be able to monitor the browser screen. I am using seleniumbase

thank you


r/selenium • • Jul 14 '21

Website detects my Selenium and blocks access

0 Upvotes

I have want to scrape a website that pretty sure blocks selenium, as I tried the same website on normal firefox and chrome and it loads perfectly well.

I don't know how I can solve this issue ?


r/selenium • • Oct 10 '25

Webdrive cannot be resolved to a type (Maven project)

Post image
0 Upvotes

Hi everyone. Please help me debug this issue. I created a Maven project and currently I am creating a repository for my login page. But it keeps throwing the said error. I have the dependency added in pom.xml and also added external jar files (solution i found in YouTube) I am pretty new to Selenium and Java. Please help me debug the issue.


r/selenium • • Oct 07 '20

Resource If anyone needs help beating reCaptcha v3 DM me - I’ve beaten it with a relatively simple script - obviously don’t want it public so it can’t be patched by google

1 Upvotes

r/selenium • • Jun 29 '20

Bet365 blocks the python + selenium chromedriver combo

0 Upvotes

There is actually not much code to share. Until last week, you could load Bet365 main page with Selenium + python. At least since yesterday, the attempts are blocked and the page doesn't load.

Code is as follows

from selenium import webdriver

browser=webdriver.Chrome(r'chromedriver.exe')

browser.get('https://www.bet365.es')

The page remains gray without loading the inside content. Right click button to inspect the page doesn't work and the aspect is similar to when they block your IP temporarily, although in a regular browser the page does load, so I guess this is not an IP block.

I didn't see distil inspecting the web so perhaps this isn't either. In short, I don't know what is happening or how to fix it.


r/selenium • • Jun 24 '20

What footprint does selenium leave? Looking to defeat bot detection

0 Upvotes

I read something about selenium leaving a selenium specific footprint in javascript.

Is there a way to override this? Or will I need to switch libraries to avoid bot detection?

(I'm aware of user-agent, screen res, delays, etc...)


r/selenium • • Jan 30 '22

UNSOLVED How can we automate login to gmail using python selenium?

0 Upvotes

I tried but the google security just says cant login using automation.


r/selenium • • Oct 03 '22

What is Selenium used for, in simple words

0 Upvotes

Selenium is a free (open source) automated testing tool for validating web applications across a variety of browsers and platforms. You can use multiple programming languages like Java, C#, Python, etc to create Selenium Test Scripts.

The Selenium test suite comprises four tools:

  1. Selenium Integrated Development Environment (IDE)

  2. Selenium Remote Control (RC)

  3. Selenium WebDriver

  4. Selenium Grid

Selenium Tools is a suite of software, each piece catering to a different organization's Selenium QA testing needs.


r/selenium • • Sep 20 '22

What is selenium automation testing?

0 Upvotes

Automation testing is the process of executing a set of predefined tests over and over again in a rapid and repeatable way, ensuring that they are always up-to-date. Automation testing dramatically reduces the need for manual testing, allowing you to focus on more important work. It also makes executing tests faster and allowed for more frequent testing.

Selenium is an open source test automation framework written in Java. It supports various browsers and provides support for various testing frameworks such as JUnit, TestNG. Selenium uses different software called drivers to control the browser.

Some of the reasons behind its popularity are as follows:

  1. Tests can be written in various programming languages.

  2. Tests can be run in different operating systems.

  3. It supports any browser that is available.

  4. It can integrate with other software frameworks like TestNG and JUnit for project management and reporting purposes.


r/selenium • • Dec 07 '21

Auto upload insta stories using selenium

0 Upvotes

Hello. I am writing a bot for auto uploading stories to Instagram. I am emulating a phone using selenium. There was a problem with Instagram, namely "turn the device to add materials to the story", as Instagram writes when trying to download a story. I can't solve this problem in any way, I will be grateful for your help, or, at least, if you tell me the ways of solving this problem. If you need a code, tell me, I will attach


r/selenium • • Feb 11 '21

Need help with automation detecting

0 Upvotes

To test my skills I am writing software that should go to the web page https://www.solebox.com/de_DE, select a product and save the name, tag and price in a .txt file. The problem is that the site detects that I am using selenium and does not allow me to access the products. I've already tried using the undetected_chromedriver library but it didn't work. Does anyone know a working method? Thank you. More info: OS: Windows 10, Chrome version: 88.0.4324.150 64 bit , Python version: 3.9.1, Writing software: Visual Studio Code


r/selenium • • Apr 09 '16

Awesome Testing - Introducing FluentLenium - Selenium waits explained

Thumbnail
awesome-testing.blogspot.com
0 Upvotes

r/selenium • • Mar 29 '22

Looking for a Selenium alternative

0 Upvotes

Hello! Due to high frustration on not even being able to make a web scrapping demo I decided to quit selenium and go with other web scrapping alternatives. Any suggestions?


r/selenium • • Sep 21 '20

Python/selenium

0 Upvotes

Can someone help with why I am getting this error? I am new to scripting but this has had me stuck for a few days now. (I have to use internet explorer). Thanks so much for all your help!

ERROR: selenium.common.exceptions.NoSuchElementException: Message: Unable to find element with css selector == input.k-textbox

HTML: <input class="k-textbox" type="text" placeholder="User Name" data-bind="attr: {maxlength: _maxLength, style: _style, placeholder: _placeholder}, disable: _disabled, textInput: _value, setFocus: _viewActions, focus: _hasFocus">

driver = webdriver.Ie(IEDriverManager().install())
#this will open up the HighJump Site
url = "http://hjweb.theblacktux.net:30000/workspace/Default.html"
driver.get(url)
driver.implicitly_wait(20)
username = driver.find_element_by_css_selector("input.k-textbox")
username.send_keys("sa")
driver.find_element_by_name("submit").click()

r/selenium • • May 21 '17

Got banned from Linkedin. How to use selenium legally?

0 Upvotes

So I have been building bots using selenium and I recently got my account banned on Linkedin. So I was wondering, since most websites state in their terms of service that you basically can't use bots or scrape data from their pages, how do you actually use these tools in the real world?

I made a Linkedin bot that applies to jobs for me and I got booted. Websites can monitor unusual traffic and tell when you are using automation tools. How can you circumvent this? I know you can randomize your calls to the server, but I still think they would be able to tell that you are using a bot.

Also scraping is prohibited by most terms of service. I love getting data off the web but most sites either don't have an API or you have to pay a lot of money for it. Any thoughts?


r/selenium • • Feb 22 '21

How To Run Selenium Tests In Brave Browser Using ChromeDriver?

0 Upvotes

r/selenium • • Sep 12 '22

Selenium Automation

0 Upvotes

Selenium is the world’s most popular automating tool that makes it easy to build and maintain automated tests. Selenium introduced the concept of WebDriver, a browser automation framework that supports multiple languages and platforms such as Java, C#, Objective-C, Groovy, Perl, Python and Ruby.

Selenium is free and an open source tool that provides an API for web developers to provide a language-independent method for writing tests. The underlying framework allows users to write test scripts in various programming languages like Java, Ruby or any other language. You can even use JSON, XML or any other data formats with Selenium without having to learn complex programming languages.

It tests your web applications by performing actions such as clicking buttons and verifying text displays in order to generate an automated functional test. Selenium can also run across different browsers to ensure your application display looks the same across them all.


r/selenium • • Sep 13 '22

Solved Commenting on an Instagram post throws StaleElementReferenceException

0 Upvotes

Hello,

I am trying to create a bot that likes and comments on posts that are on a user's Instagram feed. However, when I try to write a comment on a post using the .send_keys() function, it throws the following exception:

" selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document "

I understand the context of this exception, and I've tried some solutions already, such as:

  • Using WebDriverWait(browser, 60).until(EC.presence_of_element_located(textarea)).

  • Using WebDriverWait(browser, 60).until(EC.element_to_be_clickable(textarea)).

  • Using WebDriverWait(browser, 60).until(EC. staleness_of(textarea)).

  • Solution N°3 + refreshing the page before clicking, as advised here: https://stackoverflow.com/a/62170140/7138725

I don't know how to solve this problem after trying so many solutions and ways. Help is much appreciated.

Here is my full code:

from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import NoSuchElementException
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium import webdriver
import random
import time

def sleep_for_period_of_time():
    limit = random.randint(7,10)
    time.sleep(limit)

user = input("Enter your username: ")
pwd = input("Enter your password: ")

def main():
    options = webdriver.ChromeOptions()
    #Adding options
    options.add_argument("--lang=en")
    options.add_argument('--disable-gpu')
    options.add_argument("start-maximized")
    options.add_experimental_option("detach", True) #<- to keep the browser open
    options.add_experimental_option('excludeSwitches', ['enable-logging'])

    browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
    browser.get("https://www.instagram.com")
    sleep_for_period_of_time()

    #Finding identification elements
    username_input = browser.find_element(by=By.CSS_SELECTOR, value="input[name='username']")
    password_input = browser.find_element(by=By.CSS_SELECTOR, value="input[name='password']")
    #Typing username and password
    username_input.send_keys(user)
    password_input.send_keys(pwd)
    sleep_for_period_of_time()
    #Locating and clicking on the login button
    login_button = browser.find_element(by=By.XPATH, value="//button[@type='submit']")
    login_button.click()
    sleep_for_period_of_time()
    #Disabling notifiations
    browser.get("https://instagram.com/")
    acpt = browser.find_element(by=By.XPATH, value='/html/body/div[1]/div/div/div/div[2]/div/div/div[1]/div/div[2]/div/div/div/div/div/div/div/div[3]/button[2]')
    acpt.click()
    sleep_for_period_of_time()
    #Liking and commenting on 4 pictures on my feed
  
    #locating and clicking on the like button
    like = browser.find_element(by=By.XPATH, value='/html/body/div[1]/div/div/div/div[1]/div/div/div/div[1]/div[1]/div[2]/section/main/div[1]/section/div/div[3]/div[1]/div/article[1]/div/div[3]/div/div/section[1]/span[1]/button')
    like.click()
    print("Liked!")
    time.sleep(3)

    comment = "Cool!"
    #Locating the text area on the post and commenting
    text_area = browser.find_element(by=By.CSS_SELECTOR, value='textarea[class="_ablz _aaoc"]')
    text_area.click()
    sleep_for_period_of_time()
    
    text_area.send_keys(comment)

r/selenium • • Oct 26 '20

Resource How To Perform Localization Testing Using Selenium WebDriver?

0 Upvotes

Have you ever considered going global with your product?🌍
Have you ever backed down fearing issues with specific locales?😨

Worried about UI & content breaks?⚠
There’s no denying the challenge when it comes to a customer-facing global business. Your website is bound to face issues in terms of uniform content & UI. But that's exactly what #automationtesting is meant for!🤗

This blog entails the implementation of Localization testing with Selenium WebDriver to solve all your localization issues. ✌

Read Here: How To Perform Localization Testing Using Selenium WebDriver?


r/selenium • • Jul 11 '22

UNSOLVED LinkedIn scraper getting detected

0 Upvotes

I recently built a LinkedIn profile scraper using selenium, after about 50 profiles the account gets flagged for suspicious activity, can anyone help me out on this issue? I would really appreciate as I have worked really hard to build it. PS. I know scraping LinkedIn is against TOS


r/selenium • • Dec 20 '21

Instagram Photos by hashtag

0 Upvotes

Hey,

Well, I want to scrap a few images from a hashtag so I did automation going to the hashtag and scrolling down the view.

In each scroll down the images, the list is adding new URLs of images but somehow after the 4 or 5 scrolls, the len of the images list is decrement.

I want to add let's say X URLs to the list how do I keep scrolling down and adding all the images that are on the view to the list?

for breed in dogs_breeds_test:
    img_urls = []
    query = breed.replace(" ", "")
    print(query)
    page = driver.get("https://www.instagram.com/explore/tags/" + query +"dog")

    #scroll
    scrolldown = driver.execute_script("window.scrollTo(0, document.body.scrollHeight);var scrolldown=document.body.scrollHeight;return scrolldown;")
    match=False
    count_scroll=0 
    while(match==False):
        #img_url  = driver.find_element_by_class_name('KL4Bh').find_element_by_tag_name('img').get_attribute('src')
        #img_urls.append(img_url)
        images = driver.find_elements(By.TAG_NAME,'img')
        images = [image.get_attribute('src') for image in images]
        print("Images: %s | Counter: %s" % (len(images), count_scroll))
        last_count = scrolldown
        time.sleep(3)
        scrolldown = driver.execute_script("window.scrollTo(0, document.body.scrollHeight);var scrolldown=document.body.scrollHeight;return scrolldown;")
        count_scroll+=1
        #print(count_scroll)
        if ((last_count==scrolldown) or (count_scroll==4)):
            match=True
    #images = driver.find_elements(By.TAG_NAME,'img')
    #images = [image.get_attribute('src') for image in images]

--------------------------------------------------------------------------
AfghanHound
Images: 36 | Counter: 0
Images: 42 | Counter: 1
Images: 57 | Counter: 2
Images: 51 | Counter: 3

When I watch the HTML the div that holds all the images is refreshed and (let's say like in react) the data is rendering and the new images are in the div containers.


r/selenium • • Aug 03 '21

How do I have selenium keep me logged in on a website?

0 Upvotes

I want to be able to open up a browser, go to amazon, and see that I am logged in on my amazon account. It should just be with saving cookies, but I'm not sure how to do that, seeing that I need a moment to get logged in and whatnot.

Here's my code so far:

(Python)

import pickle
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
PATH = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(PATH)
driver.get("amazon.com")
cookies = pickle.load(open("cookies.pkl", "rb"))
for cookie in cookies:
driver.add_cookie(cookie)


r/selenium • • Aug 02 '21

Selenium clicks the wrong element

0 Upvotes

This is an odd bug that's been annoying me for a while. I have selenium move to an element with an action chain, and I can see that it has properly moved there since the selected item is highlighted. However when I tell it to click it somehow clicks an element nearby instead. Any clue as to why?