automated-tests

How to get Json response by selenium webdriver using Java?

那年仲夏 提交于 2021-02-11 13:57:01
问题 I'm trying to get Json response by selenium webdriver. How to get it as a Json format. Currently what I get is a String format. Here is what I'm trying to get: {"id":377,"text":"Playing Sudoku is fun!"} <pre style="word-wrap: break-word; white-space: pre-wrap;">{"id":377,"text":"Playing Sudoku is fun!"}</pre> Here is my code: import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class GameTestSelenuim { public static void

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 to check downloaded file name?

大城市里の小女人 提交于 2021-02-10 14:21:57
问题 I wrote a test that downloads the export file, but I also need to send this file through email. The problem is that filename is always different and I don't know how to look it up during the test. 回答1: You can retrieve the dynamic downloaded filename from the 'content-disposition' header. import { Selector, RequestLogger } from 'testcafe'; const url = 'https://demos.devexpress.com/ASPxGridViewDemos/Exporting/Exporting.aspx'; const logger = RequestLogger({ url, method: 'post' }, {

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

Protractor: what's the difference between ignoreSynchronization and async/await in Protractor

徘徊边缘 提交于 2021-02-10 06:19:15
问题 I am new in Protractor. And I am doing tests to be familiar with it. Here, I met a problem what I cannot distinguish between ignoreSynchronization and async/await method. I had 3 blocks to test them. The first is clear with protractor's own async features. it('without await and ignoreSynchronization', async function() { await browser.waitForAngularEnabled(false); await browser.driver.get('https://www.baidu.com'); console.log('1'); element(by.css('#kw')).sendKeys('protractor').then(() => {

What is a correct approach to manage test data using pytest?

半世苍凉 提交于 2021-02-09 08:59:49
问题 I need to create automated tests for several related apps and faced one problem with test data management between tests. The problem is that same data must be shared between several apps and/or different APIs. Now I have next structure with pytest that working good for me but I doubt that use test data managment in conftest.py is correct approach: Overall structure looks like: tests/ conftest.py app1/ conftest.py test_1.py test_2.py app2/ conftest.py test_1.py test_2.py test_data/ test_data

Docker hub automated build depend on another docker hub repo

心已入冬 提交于 2021-02-08 15:19:27
问题 I know the procedure and also how to configure an automated docker hub from GitHub or BitBucket. But what I have to do right now is to create two docker hub repositories called Test/main and Test/depend . The first repository Test/main is connected with GitHub and whenever there is a new push the image will be automatically build. But I want to trigger another repository Test/depend whenever there is a change on the Test/main repository. Is it possible to configure such scenario? 回答1: This

Docker hub automated build depend on another docker hub repo

社会主义新天地 提交于 2021-02-08 15:15:14
问题 I know the procedure and also how to configure an automated docker hub from GitHub or BitBucket. But what I have to do right now is to create two docker hub repositories called Test/main and Test/depend . The first repository Test/main is connected with GitHub and whenever there is a new push the image will be automatically build. But I want to trigger another repository Test/depend whenever there is a change on the Test/main repository. Is it possible to configure such scenario? 回答1: This

Azure devops - Preparing self hosted test agents

你说的曾经没有我的故事 提交于 2021-02-08 08:45:20
问题 What is the best way to create a list of Self-hosted agents in Azure Devops (In order to run Automated tests with Smartbear TestExecute) without doing all the steps manually ? Let's assume that there will be 40-50 PCs running Windows 10 which have to be made an agent and linked with the Azure pipelines. I'm looking for a way to avoid doing these steps 50 times: Create these agents manually by following all the steps here https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2