Questions tagged [browser-testing]

89 questions
145
votes
8 answers

puppeteer: wait N seconds before continuing to the next line

In puppeteer I would like to wait a defined time before going to the next line of code. I've tried to put a setTimeout in an evaluate function but it seems to be simply ignored console.log('before waiting'); await page.evaluate(async() => { …
Pipo
  • 5,170
  • 7
  • 33
  • 66
26
votes
3 answers

How to specify browser language in Puppeteer

I would like to launch a Google Chrome browser with language Spanish es using Puppeteer. I've tried puppeteer.launch(args:['--lang=es',...],...) but it didn't work. I've tried passing the environment variable LANGUAGE=es mocha puppeteer-test.js but…
14
votes
2 answers

Disable web security in Cypress just for one test

After reading the Cypress documentation on web security and when to disable it, I've decided I indeed need to do it. Is there a way to disable this just for one particular test/test suite? I'm using version 3.4.1 and this config is being set in…
DurkoMatko
  • 5,238
  • 4
  • 26
  • 35
11
votes
2 answers

Is it possible to run the Windows Phone 8 simulator directly in OS X?

I'd like to test web sites in Mobile IE. I do not need or want Windows 8 loaded, just Windows Phone 8. I understand I can run Windows Phone 8 Simulator inside a Windows 8 VM. That is not my question. I understand Windows Phone 8 Simulator is an…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
10
votes
1 answer

How does Internet Explorer 11 differ between Windows 7 and Windows 8.1?

IE11 seems to be slightly different on Windows 7 to Windows 8(.1). I guess this is because some features are tied to the OS. E.g. the IE11 on Windows 7 developer preview blog post briefly mentions SPDY: On Windows 8.1, IE11 also supports the SPDY…
dave1010
  • 15,135
  • 7
  • 67
  • 64
7
votes
2 answers

How can I test websites for Mobile Devices

What can I use to test websites I developed using HTML/CSS to see how it looks in mobile devices like iPhone/iPad/Android? Emulators/Simulators on Windows? I could installthe Android SDK and use its emulator? for Apple's devices, I need to pay for…
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
7
votes
3 answers

UnhandledPromiseRejectionWarning: Error: Protocol error (Runtime.callFunctionOn): Target closed. (Puppeteer)

I am new to Puppeteer and Node and I get this error when trying to execute the following code: 'use strict'; const puppeteer = require('puppeteer'); const evalLib = require('./oaa_a11y_evaluation.js'); function evaluateRules() { var ruleset =…
Mihir Kumar
  • 191
  • 1
  • 2
  • 11
6
votes
2 answers

Cypress good practices with cy.wait

I have the following test, written in Cypress. I use VueJS with SSR support for my frontend. My app it’s an SPA and I am testing the user click on a menu. before(() => { // mock data etc. }); it('should check if component render properly without…
Chrisss
  • 87
  • 1
  • 10
6
votes
2 answers

How to set "debuggerAddress" chromeOption via selenium-webdriver javascript API?

There is a list of recognized "capabilities" in Webdriver and "debuggerAddress" is among them. But I can't find a way to set such option neither in Capabilities class not in CromeOptions in javascript api. As I can see in several questions…
6
votes
1 answer

Test framework to replace Watin, if it would cease being maintained?

I had the impression that Watin was no longer being maintained and asked to which framework would be the best to switch to for testing of a website in a browser from .net?
tomsv
  • 7,207
  • 6
  • 55
  • 88
4
votes
2 answers

Laravel Dusk fails to assert seeing a text which is visible in the screenshot (using whenAvailable for modal)

I have written a Laravel Dusk test. I am trying to assert whether some text is visible after the modal is open. So, I am using the whenAvailable method. But it fails while I can see the text in the screenshot.…
Debiprasad
  • 5,895
  • 16
  • 67
  • 95
4
votes
2 answers

Mocking mail with Laravel 5.4 (dusk)

I'm trying to test mails within browser tests in Laravel 5.4. I have this code in a InvitationTest class inside a browse callback function: \Mail::fake(); $browser->visit('projects') ->press('etc.') \Mail::assertSent(InvitationMail::class,…
rap-2-h
  • 30,204
  • 37
  • 167
  • 263
3
votes
0 answers

Laravel Dusk getting: "stale element reference: element is not attached to the page document"

Yesterday, I run my Laravel Dusk tests and they worked fine, today I run them and 8 out of the 13 fail, most of them with "stale element reference". I've made some modifications to the app but nothing that should require me to modify the tests. I've…
Petar Vasilev
  • 4,281
  • 5
  • 40
  • 74
3
votes
1 answer

Laravel Dusk Test assert the element of selector does not exist

I am developing a Web application using the Laravel framework. I am running Dus/Browser unit testing on my application. But now I am having problem with asserting if the selected element exist. I have view file with this code snippet in…
Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372
3
votes
2 answers

How can measure application performance on browser while Functional Automation Suite is running?

Is there any tool or plugin which we can incorporate with existing Functional Automation Test suite. Earlier till 2011-12 we were using Dynatrace Ajax edition. It was a plugin for Chrome and IE. We had configured this plugin into Selenium Test case.…
1
2 3 4 5 6