e2e-testing

Log console errors using protractor

*爱你&永不变心* 提交于 2021-02-18 13:57:37
问题 I am trying to log console errors in protractor like this log output is in format { level: { value: 900, name: 'WARNING' }, message: 'message', timestamp: 1442090739962, type: '' }, { level: { value: 800, name: 'INFO' }, message: 'message', timestamp: 1442090740723, type: '' }, { level: { value: 1000, name: 'ERROR' }, message: 'error message', timestamp: 1442090740723, type: '' }, I want to catch only errors so i have written test like this it('it should be detect console errors', function()

How to determine how to compare website navigation text/links to config

一个人想着一个人 提交于 2021-02-11 12:58:03
问题 I'm trying to create a test using TestCafe/JavaScript that will compare a website's top menu text/links to the expected data stored in a config. I have some experience with TestCafe, but am still learning. When I set up the function and call it, I enter the function but not the loop within it, as evidenced by the console.log inside of the FOR loop not being printed to the console. I've been debugging this for a while and cannot figure it out. URL: https://wdwthemeparks.com Config file

How to determine how to compare website navigation text/links to config

别说谁变了你拦得住时间么 提交于 2021-02-11 12:57:59
问题 I'm trying to create a test using TestCafe/JavaScript that will compare a website's top menu text/links to the expected data stored in a config. I have some experience with TestCafe, but am still learning. When I set up the function and call it, I enter the function but not the loop within it, as evidenced by the console.log inside of the FOR loop not being printed to the console. I've been debugging this for a while and cannot figure it out. URL: https://wdwthemeparks.com Config file

How are webdriver and chromedriver options accessed in Spectron's new Application()?

冷暖自知 提交于 2021-02-10 18:01:51
问题 When I start a new Spectron application (for each test suite) I would like to fix the size of the app (for consistency across all machines and reloads). Commands like setBounds and maximise do change dimensions, but they only do so after the app has started (which means that some components have already assumed certain dimensions, which then changes test results). In the Spectron docs various launch options are available. I've tired to use webdriver and chromedriver options but they don't

I'm getting this error when ran ng e2e: Could not find update-config.json

孤街浪徒 提交于 2021-02-10 14:31:14
问题 Currently I have Protractor v.5.4.2, Node.js v.10.15.39 [09:21:29] I/launcher - Running 1 instances of WebDriver [09:21:29] I/direct - Using ChromeDriver directly... [09:21:29] E/direct - Error code: 135 [09:21:29] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.driver-manager update' to download binaries. anager update' to download binaries. [09:21:29] E/direct - Error: Could not find update-config.json. Run 'webdriver-mes

Testcafe - How to run code after all the fixtures are run

天涯浪子 提交于 2021-02-10 13:21:21
问题 I want to create a snapshot of the SQL server DB and then restore it after "all the fixtures" are run. I can do it after every fixture through .after hook in a fixture. However, that is causing issues while running tests since the DB may be still in transition after a restore. So I would prefer to do it after all the fixtures. 回答1: I have found a workaround for now. The workaround is: Add dependency for ts-node. I also had to add tsconfig.json with compiler options' lib property set to es2015

TypeError ERR_UNESCAPED_CHARACTERS on testing Vue project using Nightwatch

邮差的信 提交于 2021-01-29 14:18:07
问题 I have a problem trying to setup my Nightwatch environment with Vue CLI. At this point, I just want to make it work with Chrome (we'll see for Firefox soon) but when I run a simple test, It doesn't work. Here is my test file: module.exports = { 'default e2e tests': browser => { browser .url("http://localhost:8080") .waitForElementVisible('#app', 5000) .assert.ok(true) .end() } } throwing the folowing error: Error while running .isElementDisplayed() protocol action: TypeError [ERR_UNESCAPED

TestCafe & chrome:headless : how to force the browser language (locale)

谁说我不能喝 提交于 2021-01-29 03:13:32
问题 I have write a few browser test who run with TestCafe, chrome:headless. The test are launched by commandline, from a server that I don't want to change the default language. My website is multi-language. I want to be change the language of the test, without having to impact the language of the server/computer each time. How can I do that? I launch the tests with this command line: npx testcafe chrome:headless src/scenarios/**/*.test.ts 回答1: It all depends on your "multi-language"

How can I pass a fake media stream to safari IOS in browserStack capability?

£可爱£侵袭症+ 提交于 2021-01-29 02:58:14
问题 I am using protractor and selenium with browser stack and trying to automate a webrtc web application, I need to get rid of browser asking for permission and using a fake stream instead of real camera and mic as available in chrome. I have tried using these options they both do not work. Option 1: var capabilities = { 'browserName': 'iPhone', 'device': 'iPhone 6S', 'realMobile': 'true', 'os_version': '11.4', "media.navigator.permission.disabled": true, "media.navigator.streams.fake": true };

TestCafe visibilityCheck does not wait for element to appear

爱⌒轻易说出口 提交于 2021-01-28 19:50:35
问题 I am trying to get TestCafe to wait for an element to appear in the dom. Currently I am using { visibilityCheck: true } but it does not seem to do anything and the test will time out and be considered a failure. Goals: Go to page Wait for searchIconElement to load Code: fixture`Library /all`.page(page.libraryScreen).beforeEach(async t => { await t.useRole(page.adminUser); }); test('Search Bar', async t => { const searchIcon = Selector('div').withAttribute('class', 'CampaignsPage-fab1'); const