Questions tagged [automated-tests]
Test automation is the use of software to control the execution of tests, the comparison of actual outcomes to predicted outcomes, the setting up of test preconditions, and other test control and test reporting functions. Commonly, test automation involves automating a manual process already in place that uses a formalized testing process (wikipedia.org).
automated-tests
13,286
questions
673
votes
19
answers
733k
views
Get HTML source of WebElement in Selenium WebDriver using Python
I'm using the Python bindings to run Selenium WebDriver:
from selenium import webdriver
wd = webdriver.Firefox()
I know I can grab a webelement like so:
elem = wd.find_element_by_css_selector('#my-id'...
502
votes
27
answers
532k
views
Message "Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout"
I'm using Puppeteer and Jest to run some front end tests.
My tests look as follows:
describe("Profile Tab Exists and Clickable: /settings/user", () => {
test(`Assert that you can ...
479
votes
54
answers
695k
views
Debugging "Element is not clickable at point" error
I see this only in Chrome.
The full error message reads:
"org.openqa.selenium.WebDriverException: Element is not clickable at point (411, 675). Other element would receive the click: ..."
The ...
348
votes
30
answers
1.0m
views
Typing the Enter/Return key in Selenium
I'm looking for a quick way to type the Enter or Return key in Selenium.
Unfortunately, the form I'm trying to test (not my own code, so I can't modify) doesn't have a Submit button. When working with ...
282
votes
17
answers
220k
views
Cypress: run only one test
I want to toggle only running one test, so I don't have to wait for my other tests to see the result of one test.
Currently, I comment out my other tests, but this is really annoying.
Is there a way ...
280
votes
27
answers
604k
views
How can I scroll a web page using selenium webdriver in python?
I am currently using selenium webdriver to parse through facebook user friends page and extract all ids from the AJAX script. But I need to scroll down to get all the friends. How can I scroll down in ...
269
votes
4
answers
100k
views
What would be an alternate to [TearDown] and [SetUp] in MSTest?
When I use MSTest Framework, and copy the code that Selenium IDE generated for me, MSTest doesn't recognize [TearDown] and [SetUp]. What is the alternative to this?
269
votes
37
answers
791k
views
Scroll Element into View with Selenium
Is there any way in either Selenium 1.x or 2.x to scroll the browser window so that a particular element identified by an XPath is in view of the browser? There is a focus method in Selenium, but it ...
219
votes
30
answers
470k
views
Selenium C# WebDriver: Wait until element is present
I want to make sure that an element is present before the webdriver starts doing stuff.
I'm trying to get something like this to work:
WebDriverWait wait = new WebDriverWait(driver, new TimeSpan(0, 0, ...
217
votes
11
answers
286k
views
In Cypress how to count a selection of items and get the length?
I'm starting to learn Cypress. I have a 4 row table (with a class of datatable). I can verify the number of rows this way:
cy.get('.datatable').find('tr').each(function(row, i){
expect(i).to....
182
votes
5
answers
93k
views
JUnit confusion: use 'extends TestCase' or '@Test'?
I've found the proper use (or at least the documentation) of JUnit very confusing.
This question serves both as a future reference and as a real question.
If I've understood correctly, there are two ...
167
votes
17
answers
120k
views
Unit testing Bash scripts
We have a system that has some Bash scripts running besides Java code. Since we are trying to test everything that could possibly break, and those Bash scripts may break, we want to test them.
The ...
160
votes
20
answers
113k
views
Compare equality between two objects in NUnit
I'm trying to assert that one object is "equal" to another object.
The objects are just instances of a class with a bunch of public properties. Is there an easy way to have NUnit assert equality ...
155
votes
11
answers
129k
views
Random "Element is no longer attached to the DOM" StaleElementReferenceException
I'm hoping it's just me, but Selenium Webdriver seems like a complete nightmare. The Chrome webdriver is currently unusable, and the other drivers are quite unreliable, or so it seems. I am battling ...
154
votes
9
answers
262k
views
Running Selenium WebDriver Python bindings in Chrome
I ran into a problem while working with Selenium. For my project, I have to use Chrome. However, I can't connect to that browser after launching it with Selenium.
For some reason, Selenium can't find ...