automated-tests

How to select elements with the same css selector

 ̄綄美尐妖づ 提交于 2020-01-25 09:28:04
问题 I have numerous elements in my ui tests that have the same css selector name but the issue I'm have is how to select each of them separately. I recall there was a way to add [1],[2] after each of them but i cant seem to make it work. I'm currently using "[data-qa-inning-value]"[1], "[data-qa-inning-value]"[2], etc but it is not picking it up, any help? It currently isn't picking anything up but I do remember there was a way to do it but I just cant find it in my notes 回答1: Ideally, you should

TestCafe: User Role logs out the user in the first test

大城市里の小女人 提交于 2020-01-24 20:38:06
问题 I'm trying to implement User Role in my existing tests as I don't want to login in every tests. Here is what my tests look like: const accountUser = Role('https://localhost:9000', async (t) => { await t.wait(1000); await loginPage.login(inputData.emailId, inputData.password); }, { preserveUrl: true }); fixture`login-test` .meta('testingType', 'regression') .requestHooks(mock) test('Add a person', async (t) => { await t.useRole(accountUser); await loginPage.goToPeopleList(inputData

Console output missing in Azure DevOps release when enabling “Specify a batch size”

橙三吉。 提交于 2020-01-23 07:23:24
问题 We have a large test set running (based on NUnit) within Azure DevOps. Recently we enabled the "Rerun failed tests" option within the Visual Studio Test task. At first, this didn't work due to a bug in VSTest with handling custom test display names (which are required for our tests). Tests would still only run once. However, by setting a batch size, this issue is fixed and tests are finally retried correctly. It works wonderful, except for one strange effect... for no apparent reason, the

Console output missing in Azure DevOps release when enabling “Specify a batch size”

只愿长相守 提交于 2020-01-23 07:23:10
问题 We have a large test set running (based on NUnit) within Azure DevOps. Recently we enabled the "Rerun failed tests" option within the Visual Studio Test task. At first, this didn't work due to a bug in VSTest with handling custom test display names (which are required for our tests). Tests would still only run once. However, by setting a batch size, this issue is fixed and tests are finally retried correctly. It works wonderful, except for one strange effect... for no apparent reason, the

Timed out after 30000ms when I tried to go next page by clicking Submit button using Selenium RC

我是研究僧i 提交于 2020-01-21 14:56:26
问题 I am using Selenium RC by java. Fill up necessary data on 1st page--> Click Submit button to go next page. My code is: selenium.click("Submit"); selenium.waitForPageToLoad("30000"); After clicking Submit button I found the error: com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms Can anybody pls help me? 回答1: Selenium.waitforpagetoload("30000"); means you are giving time 30000 m.s= 30 seconds It means your page is taking more than 30 seconds to load completely. So in order

Customize TestCafe Selector in TypeScript for Shadow root Element

ぐ巨炮叔叔 提交于 2020-01-21 14:38:10
问题 Please help me to define Selector part in TypeScript import { Selector, t } from 'testcafe' fixture `Scenario Name : Validation` .page `https://chrisbateman.github.io/guide-to-web-components/demos/shadow-dom.htm`; const demoPage = Selector('#demo1'); const paragraph = Selector(() => { return demoPageSelector().shadowRoot.querySelectorAll('p'); }, { dependencies: { demoPageSelector: demoPage } }); test('Test ShadowDom', async t => { await t .expect(paragraph.value).eql('Some text'); }); 回答1:

Is it possible to run incremental/automated JUnit testing in Eclipse?

烂漫一生 提交于 2020-01-20 02:43:45
问题 Eclipse support incremental compiling. If I save a source file then it will compile the modified files. Is it possible after such incremental compile also to run the JUnit tests of the same package and show the fail in the error view. Then I can see the JUnit test failing and compiling errors in the same view without extra action. Are there any plugins that can do it? 回答1: You have to look at these plugins: JUnit Max: Not free, developed by Kent Benk (one of the men behind the TDD practice);

Selenium: Check i the testcase pass or fail

元气小坏坏 提交于 2020-01-17 05:37:09
问题 Guys First of all I am totally new for Selenium. I am having a automation project. In my project, I am creating a screenshot function to take screenshots of my event which I have created for my testcases. Now if my test cases passes then all screenshot should move to Pass folder, else fail folder. I would like to know how to detect that my test case pass? I know Nunit detects but I wanted to program it so that I cam place my screenshot as well as log file to pass or fail folder. Program in C#

How do I avoid the loop argument

妖精的绣舞 提交于 2020-01-16 14:34:10
问题 The following code is part of some automated tests that I have written in python 3.6: connected = False def aiohttp_server(loop): async def handler(msg, session): global connected if msg.type == sockjs.MSG_OPEN: connected = True if msg.type == sockjs.MSG_CLOSE: connected = False app = web.Application(loop=loop) sockjs.add_endpoint(app, handler) runner = web.AppRunner(app) return runner def run_server(runner, loop): logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %

Cypress: Get token from API then save in local storage and use in another API's header then return the response body of the 2nd API

…衆ロ難τιáo~ 提交于 2020-01-16 11:25:34
问题 I have an API (let's call it getToken ) to generate a token in its response body. I then call that token and store in the header of another API (let's call it returnBody ). It makes sense to use localStorage for the getToken API as this token is re-usable for multiple API's. However, I am having doubts using localStorage if I need to return / display the response body of the succeeding API's such as returnBody . Inside the API's function/command, it logs the response body. However, when I