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.

731 questions
8
votes
1 answer

How to disable Flash in Firefox with Selenium in Python?

Trying to disable Flash in Firefox with Selenium in Python, using profile settings. This question specifies a way to do it through the GUI, but it would be better for this particular use case to do it programmatically. Specifically, the best…
Juan Carlos Coto
  • 11,900
  • 22
  • 62
  • 102
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,876
  • 7
  • 26
  • 43
7
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'…
Jakub Sip
  • 195
  • 1
  • 10
7
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
  • 73
  • 5
7
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…
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
  • 844
  • 1
  • 11
  • 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
  • 2,089
  • 2
  • 14
  • 17
6
votes
1 answer

How to test webpages on an iOS device

I can't afford an iOS device but users reported me that there is some issue in my website with the bottom navigation fixed bar for mobile with the iOS navigation strip at the bottom so how can I take a look at my website on an iOS device in order to…
I'm Beginner
  • 81
  • 1
  • 7
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
2 answers

Testcafe get text from element

I'm trying to get a text from a modal on Chrome. Using the console, I can get the inner text as follows: document.querySelector('.my-form > a').innerText // returns http://a-url.com Now, on my test, I can evaluate the element using const myText =…
6
votes
1 answer

Testcafe unable to determine if an element is enabled or disabled

I'm using the TestCafe 0.23.3. I'm trying to verify an element if it is enabled or disabled. Here is the HTML node of the element when it is disabled:
6
votes
1 answer

Changing user agent on headless chrome

I have an issue with changing the user agent. I am trying to use the following line in my runner.js file in the browsers array : chrome:headless:userAgent=Mozilla/5.0\ \(Linux\;\ Android\ 5.0\;\ SM-G900P\ Build/LRX21T\)\ AppleWebKit/537.36\…
6
votes
1 answer

Login to Azure Active Directory programmatically

I have a site (app) registered with Azure Active Directory. I need my web tests to authenticate themselves (with a pre-existing testing user) at the start in order to obtain an auth token for the tests to hit the protected APIs. What's the best way…
Cuthbert
  • 1,202
  • 1
  • 12
  • 18
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
  • 13,492
  • 16
  • 50
  • 87
1 2
3
48 49