Questions tagged [web-testing]

Software testing that focuses on web applications. Before the system becomes public, complete testing of a web-based system can help to address issues.

Software testing that focuses on web applications. Before the system becomes public, complete testing of a web-based system can help to address issues.

677 questions
8
votes
8 answers

Is there a way to automate 'look and feel' testing of a web page?

I have few resources to perform testing on many projects with hundreds of different web pages and the most tedious part is verifying the look and feel of the site is OK. Specially the layouts of HTML elements are not broken. Is there a way to…
amjad
  • 2,586
  • 6
  • 22
  • 40
7
votes
2 answers

Command to run two or multiple tests

How to run two or more tests from a single TestCafe CLI command. -t "Test name" accepts only one test name. https://devexpress.github.io/testcafe/documentation/using-testcafe/command-line-interface.html#-t-name---test-name Requirement: Want to run…
7
votes
5 answers

How do you change your apparent country of origin to test a site?

I want to be able to set my country of origin - does this involve testing through a proxy, or is there something that can be set else where?
user15420
  • 1,022
  • 1
  • 10
  • 11
7
votes
1 answer

How to test with behat two sites in the same test with different environments (so different URLs)

I'm using Behat and Mink to test several sites. Two of them use Single Sign On, so one of my test includes login in one site, go to second site and check I'm logged in. This is acomplished with this behat code: Feature: SSO In order to login in…
sanzante
  • 744
  • 1
  • 9
  • 28
6
votes
1 answer

Selenium 2 right-click

I am using Selenium 2 (Web Driver) under Linux with a FireFoxDriver. I am not able to perform a right click on a WebElement or on another possition using coordinates. I also cannot move the mouse pointer. I have tried to use the "Actions"…
Angel Romero
  • 1,539
  • 2
  • 11
  • 16
6
votes
1 answer

How to add recursive function checking xhr response in testcafe script?

I'm trying to write a test download works, which requires to check if xhr response has status READY. I created a client function in TestCafe, using promises, but it's failing in case of recursion. How should I fix my code to handle this situation?…
6
votes
1 answer

TestCafe - How can I run multiple fixtures (one after the other, not concurrent)?

I have multiple fixtures (interaction between a website and a hybrid app) and I would like to have a test suite run (Smoke test, regression test ...) but I'm not sure how to do it. This is how my tests look like: What I want to do is run all tests…
6
votes
1 answer

How do I read, update and replace a "String body" field in a web test from a plugin?

My recorded web performance test has several "String body" fields and I need to modify their contents at run time from within a web test request plugin. The "String body" field is not directly available from the various fields and subfields of the…
AdrianHHH
  • 12,664
  • 16
  • 48
  • 79
6
votes
3 answers

Anti forgery token and web testing

I am trying to do a web test in VS2012 for an MVC site. One of the scenarios is to login and go through a list of products, select the one you want and follow through to the purchase page. Problem is that when the web test is run, I get an error…
Ahmed ilyas
  • 5,502
  • 8
  • 37
  • 68
6
votes
2 answers

Selenium: difference between "role hub" and "role webdriver"?

I'm using Selenium for automated testing. What's the difference between java -jar selenium-server-standalone-2.24.1.jar -role hub and java -jar selenium-server-standalone-2.24.1.jar -role webdriver ? It seems to be the same. Or is there any…
ccman
  • 1,133
  • 1
  • 8
  • 10
5
votes
2 answers

In Testcafe, how can I wait for a 2nd element of the same selector to appear?

I have a scenario in which multiple elements of the same className appear one after the other (it depends on a server response). What I'm trying to achieve is passing the test only after 2 elements of the same selector are present, but currently,…
tkore
  • 933
  • 10
  • 27
5
votes
0 answers

Testcafe concurrency throwing weird errors

I have a suite of tests that, when running without concurrency, all pass fine. When I start running them with concurrency, they start to fall apart. I do not believe that the tests have inter-dependencies that are making them fail. When the test…
5
votes
1 answer

How do I insert a variable into a regex .match() assertion?

I would like to add a variable, 'example', into a regular expression assertion. const example = Selector('xyz'); await t.expect(getLocation()).match(/^https:\/\/int-.*.example.com\/en\/example\/-\/ ** HERE SHOULD BE INSERTED A VARIABLE, 'example'…
5
votes
2 answers

Is there a way to bail the suite if a certain test fails?

I have one test that, if it fails, indicates larger problems with the app. There wouldn't be any point in running the rest of the tests if that one test fails. Is there a way to bail the suite if a single test fails but run all tests if that test…
jcollum
  • 36,681
  • 46
  • 162
  • 279
5
votes
2 answers

How do I mock a Date() in testcafe?

My test includes a step where the date is set based on the current date (using dayjs()). I need to always get the same, pre-defined date. dayjs() calls new Date(), so my approach was to mock the global Date() constructor. I've tried it like…
Kim
  • 53
  • 5
1 2
3
45 46