Questions tagged [selenium]

Selenium is a tools suite to automate web browsers, and web application testing

Filter by
Sorted by
Tagged with
8
votes
1answer
8k views

Scraping the full content from a lazy-loading webpage

I've written a script in python in combination with selenium which is able to scrape 1000 links from a webpage in which lazy-loading method is applied for that reason it displays it's content 20 at a ...
1
vote
1answer
377 views

is it good practice to use relative path in xpath more than once [closed]

I am using Selenium Webdriver-Java to automate a web application. Suppose the html is somewhat like below: ...
4
votes
1answer
2k views

Scraping all closed captions (subtitles) of a YouTube's creator's video library

A script that scrapes all YouTube's videos closed captions(subtitles) of a single creator's video library. It scrapes either auto-generated or manually written subtitles. The script accepts a link to ...
3
votes
1answer
216 views

Parser for gleaning data from twitter

I've written a script in python to parse the name, tweets, following and follower of those people available in view all section in my profile page of twitter. My scraper is able to parse those ...
2
votes
2answers
199 views

Scraper for Redmart.com

I've written a script which is scraping a webpage encrypted within javascript. The scraper is extracting name, price and image link of certain products from that page. I used selenium in combination ...
1
vote
1answer
459 views

Click through a table of hyperlinks

My goal was to click every single hyperlink under the "Shortcuts" header on here. The code looks like it works to me, but if you have ideas that could help me improve/change I would love to hear them!...
2
votes
1answer
101 views

Return boolean for navigation (nav) links before and after clicking them

I want to write a function to check if some nav links exist or not. However, those nav links are under one of the listbox icons so I need to click the icon before and after to check if the element ...
3
votes
0answers
657 views

Navigate to three pages in parallel with Selenium, ChromeDriver, and NUnit

As an experiment, I've created an NUnit test project that should, when running all tests, open three browser windows simultaneously, and each should load a particular page before closing. My question ...
6
votes
2answers
911 views

Selenium-based link checker for a shopping site

I just started learning Python and I wrote my first useful script for work. I did a bunch of the basic tutorials and really enjoyed learning Python so far. I am looking for any advice on how to make ...
3
votes
1answer
850 views

Download a list of songs from Youtube using Selenium

Given a text file containing a list of links, I wrote some code to download them, one by one, from YouTube, using either YoutubeMP3 or Convert2mp3 logging any songs that failed to download. The code ...
0
votes
2answers
209 views

Handling missing elements on login form in Selenium

I try to improve my code so that I don't have to program a try - catch block all the time. e.g. at the moment I have to write many codeblocks like this: ...
2
votes
1answer
2k views

Verify if the element is readonly or disabled

I have written a function where it checks if the field is read-only or disabled. However, first it check if that element field is present This is my working function, but i feel like this is too ...
1
vote
1answer
585 views

Validating sign up pages using Selenium Python

I have multiple sign up pages that I am currently testing. Each of the form have seprate fields. However, some share common fields(as you can see from signup page.py). This is what I have so far(I ...
2
votes
1answer
2k views

Testing multiple logins using Selenium listed in a property file

Excuse please review my code. I am working in automation testing. I did a automation testing for my login page. I am using selenium with page object pattern. I wrote here my code. I am using java ...
2
votes
1answer
129 views

Initializing a controller that uses Selenium

I've outsourced the setup functions from my class to another file, I outsourced initDriver from the class PortalController to ...
3
votes
1answer
145 views

Recursively checking the css class of an iFrame Element

I am writing some tests in selenium webdriver (on node.js). and have made a custom function to check the css value of an iFrame Element. I'm a coding beginner. The script tests an app where the user ...
3
votes
1answer
302 views

Taking action on a webpage(select checkbox or enter textbox or select from a list)

I currently have the following code. This function works successfully, however, i would like some feedback because I think it is very messy. Currently, this function checks if the field is ...
2
votes
1answer
79 views

Selecting currencies on a form using Selenium

I have written the following code for the selenium Python select function and the code works fine. ...
3
votes
1answer
2k views

Scraping restaurant names and addresses from a website using Scrapy and Selenium

I have written some Python code that uses Scrapy and Selenium to scrape restaurant names and addresses from a website. I needed to use Selenium because the button to show more restaurants on a page is ...
4
votes
2answers
328 views

Python Stock Checker

...
3
votes
2answers
80 views

Testing whether webapp-generated reports match expected output

I'm new to coding and have cobbled together some code to run an automated test against a web application. The code works but I have some complexity rule violations (CA1505, CA1502 and CA1506) and ...
2
votes
2answers
33k views

Login page with Selenium webdriver

I am automating a login page. I am using the page object design pattern Selenium with Java. What should I improve on in my code? ...
13
votes
1answer
1k views

Functions to hide and reclaim first visible publication on a page using Selenium

I have the following functions in JavaScript: ...
-1
votes
1answer
542 views

Selenium Kijiji web scraper

I have this script working pretty well but I know that there must be many things that I could do better to make it more efficient. ...
0
votes
1answer
87 views

Testing factory and beforemethod

I'm trying to find out if it is possible to simplify my framework a little bit more. The current solution works, but it does cause some code duplication for me and some other issues that might come ...
6
votes
1answer
5k views

Retrieving value from HTML table

Currently all this does is retrieve data from specific columns, the final result will be that I will check the data to make sure that it passes the test cases, but I want to look at this foreach right ...
4
votes
1answer
983 views

Selenium WebDriver test for Slack

I submitted this script as part of a interview process. It was rejected and no reasons were given. I'm wondering what parts of my script were unacceptable. The script works, and satisfies the question,...
10
votes
3answers
2k views

Scraping the date of most recent post from various social media services

Task I have a large spreadsheet where each line should include: The URL of a social media account A field indicating whether the account is "active" A name and UID number for each account I have to ...
1
vote
1answer
1k views

Select fields from a form by ID or Xpath and fill its value

I'm writing a program/tests in C# using Selenium and Chrome web driver. Everything works well, however I would like to simplify the code and make it object-oriented. I thought about extracting some ...
5
votes
1answer
2k views

Using Page Object Model in Selenium tests

I am very new to Selenium, and for my current project, I had the task of creating the automated test scripts for our website. I am the only one on my team who had any experience with Selenium, but not ...
0
votes
1answer
96 views

Implement PageObjects using TestNg in selenium

I am trying to implement page objects with Page factory using TestNg and selenium. Please advice improvements in it. Classes: ...
2
votes
1answer
366 views

ImprSimple chat bot written in python

I'd like to know if I can improve the performance of my recent bot, and maybe some design patterns too. So far, it's warning a user if it's using some bad words (which are parsed from ...
5
votes
1answer
2k views

Selecting filter checkboxes using Selenium

I am using Selenium Webdriver via Java. My method clicks on a filter check box (eg. make, model, etc.), that is passed in, from a modal. When running my method in my test class, via ChromeDriver, it ...
2
votes
1answer
67 views

Comparing web search results and storing the results in Excel

I'm writing Selenium code in Java. And below is one of the methods. ...
5
votes
2answers
5k views

Checking if text is NOT displayed

I'm currently writing unit tests in Selenium (C#). I need to do two things in this particular test: Check if 2 errors (with html container) are displayed and check if another (given) error is not ...
10
votes
2answers
154 views

Get Wikimedia attributions for images

We are using images from Wikimedia commons for some of Cardshifter's game artwork. I selected some art for each card to make a .jpg file to use in the game clients, ...
3
votes
1answer
91 views

Bot that selects web reviews based on spreadsheet entries

In my program, I prompt the user to enter a range of cities (in a spreadsheet), and then a range of review scores, and then make some decisions based on what the user has entered. Since the handling ...
4
votes
1answer
845 views

GUI for Selenium web testing

I am wanting to build web-based testing tools for test website environments utilizing the Selenium Web Driver. I am building a GUI which will contain the following: Drop-down for selecting the website,...
6
votes
2answers
4k views

Selenium Framework using a lot of statics

I am writing a Selenium framework that should be really easy for a tester with relatively little Java knowledge to use and write tests for. In order to keep the framework as user friendly as possible, ...
7
votes
1answer
5k views

Scraping scores from flashscore.com

I built a bot with Python to scrap scores on flashscore.com but the data scrap from the site loads into its listbox very slowly. I am curious about the speed of selenium so I made a button that prints ...
5
votes
1answer
7k views

Copy table using Selenium and Python

I have some Python code that copies a table from a website using Selenium,to create a csv, but as I haven't used Selenium much, I have that irksome feeling in the back of my mind that there must be a ...
4
votes
1answer
6k views

Ruby selenium script waiting for an element to disappear

I'm a Java developer, I'm new to Ruby and I'm worried that I'm forcing or not-so-well using the goodness of the Ruby syntax. What do you think about the Exception catching and how to print it in ...
1
vote
1answer
2k views

Trying to catch and throw exceptions if error message window is found

I'm writing a test to validate that while clicking through a series of menu items, an error message pops up, and if it does, then I should throw an exception. Now I wonder: Is it appropriate to use ...
4
votes
2answers
548 views

Improving performance in a Webdriver method

I'm testing an application which is not exactly an e-commerce application but which behaves enough like one that you can think of it as an e-commerce application for the purposes of understanding this ...
4
votes
4answers
2k views

Using if else statements correctly

I have the following code, but I'm looking for a way to make the code read easier. ...
3
votes
1answer
248 views

Selenium Java: errorRecovery

I have the following code to select an image using Selenium, only now I have added an errorRecovery. Is there is a better way to right the code in the ...
2
votes
2answers
10k views

List of search results using Selenium

I have written the following code for looping through WebElements in Selenium. Can someone please provide me with feedback on how to improve my code? ...