automated-tests

How do I include screenshots of the full page in my serenity report (and not only of the viewport) using ChromeDriver?

孤者浪人 提交于 2019-12-24 01:18:56
问题 I am using serenity in combination with cucumber for automated screen tests and want to include full-page screenshots in my serenity report. The screenshots in the report are normally only a capture of the viewport. Oftentimes however, this doesn't provide enough information as this is only a part of the screen. I found that the capturing of serenity screenshots is a part of driver implementation. As most drivers conform with the W3C definition of screenshots those drivers only capture the

HP-UFT WPF TextBlock object capture

耗尽温柔 提交于 2019-12-24 00:57:41
问题 I am working on a WPF application where we have to automate testing. This work fine for many components but we struggle to check a summary page where we use TextBlock to display our data. The WPF TextBlock is not found by the HP tool. Thus we cannot check the values that we display. We tried the following solutions but without success: Change x:Name in Name (not the best idea right, but we tried all!) AutomationProperties.AutomationId on the TextBloc AutomationProperties.Name Make the

How to run robotium tests in a specific order?

我与影子孤独终老i 提交于 2019-12-24 00:54:18
问题 I have this robotium testproject which has one testclass. The test class contains all the test methods. Right now when I run the test class, the test methods are run in alphabetical order. Since I have some dependencies between the test methods(i know this is not the preferred practice) I want the test methods to run in a specific order. The reason I am having dependencies is that, it allows for less code to be written and makes the whole test class to run faster. Is there any way to run the

How to append data to csv file in Robot Framework?

我与影子孤独终老i 提交于 2019-12-23 22:57:58
问题 I would like to append data to .csv file which is not empty in Robot Framework now, but I meet some questions. I installed CSVLibrary from 's4int' of 'robotframework-CSVLibrary' in github and it has a keyword named 'Append To Csv File'. I can append data into .csv file but there are some issues with the format. First I have an empty csv file and I run my scripts in Robot Framework. *** Settings *** Library Selenium2Library Library CSVLibrary *** Variables *** *** Test Cases *** test ${list}=

In TestCafe is there a way to know if the test passed or failed in after hook?

只愿长相守 提交于 2019-12-23 21:27:52
问题 I am trying to mark tests as pass/failed through a rest API (Zephyr) while my testcafe tests are running. I was wondering if it's possible in the after or afterEach hook to know if the test passed/failed so that I can run some script based on the result. Something like: test(...) .after(async t => { if(testFailed === true) { callApi('my test failed'); } }) 回答1: I see two ways in which to solve your task. First, do not subscribe to the after hook, but create your own reporter or modify the

Python - Remote Webdriver with Extension installed in it

烂漫一生 提交于 2019-12-23 20:10:27
问题 I want to test one extension on different browser versions using BrowserStack. This is a function that returns driver with specified capabilities. I have a .crx file for Chrome and an .xpi file for Firefox on my local machine. I want to use Remote Webdriver with a corresponding extension installed, using Python. def my_webdriver(browser, browser_version, os, os_version): caps = {} caps["browser"] = browser caps["browser_version"] = browser_version caps["os"] = os caps["os_version"] = os

How to manage to exit phantomJS launcher after tests execution?

落爺英雄遲暮 提交于 2019-12-23 17:38:41
问题 I am writing angular 2 app and trying to setup test on Gitlab CI using phantomJS launcher. After all tests pass ok phantomJS launcher remains active forever(http://i.imgur.com/TD7cLdq.png). How I can manage to exit after test successfully passed? Here is my package.json : { "name": "kibernum-dnc-client", "version": "0.0.0", "license": "MIT", "angular-cli": {}, "scripts": { "ng": "ng", "start": "ng serve", "lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e

How to do 'beforeEach' only at Fixture level and not for each test under that fixture

。_饼干妹妹 提交于 2019-12-23 16:26:38
问题 I want to run 'beforeEach' only at the fixture level and not for each test under that fixture fixture `Fixture A for Use Case1` .beforeEach(login) test('A Test 1', async t => { await t --- }); test('A Test 2', async t => { await t --- }); fixture `Fixture B for Use Case2` .beforeEach(login) test('B Test 1', async t => { await t --- }); test('B Test 2', async t => { await t --- }); test('B Test 3', async t => { await t --- }); What Is Happening The login function is being run before every test

How do I use WScript.Shell SendKeys to send Number Pad key strokes?

冷暖自知 提交于 2019-12-23 15:48:31
问题 I am trying to use WScript.Shell SendKeys method to emulate sending a key press from the Number Pad. I have an application that I am writing automated testing for using QTP. It is a Web Browser based application and the input is into a Java App within the web page. The input only accepts key presses from the Number Pad and the Enter key. So far I am using this code: Dim strInputKey strInputKey = "{ENTER}" Set objWsh = CreateObject("WScript.Shell") Browser("Launch Browser").Page("Test

Difference between supertest's expect and then?

筅森魡賤 提交于 2019-12-23 15:29:38
问题 When using supertest for testing async HTTP requests in JavaScript, what's the difference between these two snippets? Is one of them correct and the other one wrong? request('http://localhost:8080/').get('/api/people') .expect(res => res.body.should.have.length(5)) vs. request('http://localhost:8080/').get('/api/people') .then(res => res.body.should.have.length(5)) The only differences I could notice were: expect returns a Test object and, when test fails, prints a large stack trace then