automated-tests

In Puppeteer how to switch to chrome window from default profile to desired profile

让人想犯罪 __ 提交于 2019-12-23 12:27:54
问题 My requirement is to test chrome extensions on a new profile. I referred https://peter.sh/experiments/chromium-command-line-switches/ for Chromium args[--user-data-dir, --profile-directory] After the browser is launched, 2 chrome windows are opened. One with given profile and extension and another with default profile and given extension. Also the focus is on a window with default profile. So all actions are happening on it. I had expected that only 1 browser window would be opened with

sniffer can't find DJANGO_SETTINGS_MODULE

自作多情 提交于 2019-12-23 12:15:44
问题 I'm trying to automate the test rerun after a change while developing. After searching around a little sniffer seemed fine. But if I run it my tests fail with this error: ERROR: Failure: ImportError (Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.) if I run them manually they pass. Do you have a clue why sniffer won't work? 回答1: Something like the following as your scent.py should work: from subprocess import call from sniffer.api import runnable

Why should you avoid conditional logic in unit tests and how? [closed]

老子叫甜甜 提交于 2019-12-23 09:30:12
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 years ago . Imagine having the following classes: public class Product { private String name; private double price; // Constructors, getters and setters } public class Products { private List<Product> products; // CRUD methods public double getTotalPrice() { // calculates the price of all products } } I have

How to run Mstests on a Mac?

ぐ巨炮叔叔 提交于 2019-12-23 09:28:20
问题 I have a need to write some mstests and run these tests on a Mac. The binaries for the source code being tested are already up and running on Mac. To run test automation written in Visual studio, do I follow the same process? Any pointers on how to get started with running these test cases using Mono on a Mac ? 回答1: I know this issue is old but I came across it while searching for solutions for running MSTest on my mac. I'll investigate the above but also worth noting that MSTest support on

Is there a way to test AppSync code locally and/or in CI/CD?

让人想犯罪 __ 提交于 2019-12-23 09:01:24
问题 I am looking to dive into a project using AppSync. So far I have been able to find plenty of articles and such online giving all the steps as to what buttons to click in order to get a sample project running, but none of them seem to touch on how one deals with it from a local development or in a CI/CD environment. Its probably my "old school" idea of how dev usually works, but I was expecting some way to simulate enough of the environment locally to do development and run unit tests, but I

getting a node's value from XML file in TestComplete

陌路散爱 提交于 2019-12-23 03:45:51
问题 My XML file's structure is like this.. <?xml version="1.0" encoding="utf-8" ?> <atom:entry xmlns:atom="http://www.w3.org/2005/Atom"xmlns:core="http://x.y.com/xy/xyz"> <atom:title>TestTitle</atom:title> <atom:link rel="a" href="$a_u"/> <atom:link rel="ot" href="$ou"/> <atom:link rel="db" type="app/c.d.p+xml" href="e.xml"> <atom:inline> <payload xmlns="http://www.yyy.com/xxx" model="https://xxxx.yyy.com/api/te/db/et/r1"> <field name="asset.title"> <value>DP</value> </field> <field> <value>xxx<

How to download a file using Watir 6.0

ぃ、小莉子 提交于 2019-12-23 03:45:08
问题 I'm trying to download a CSV file with the new Watir 6.0. I found the profile settings for Firefox: profile = Selenium::WebDriver::Firefox::Profile.new profile['browser.download.folderList'] = 2 profile['browser.download.dir'] = path_to_download profile['browser.helperApps.neverAsk.saveToDisk'] = "text/csv" browser = Watir::Browser.new :firefox, :profile => profile But Firefox 50.0 doesn't support loading profile settings. I get this error message: /var/lib/gems/2.3.0/gems/selenium-webdriver

Test an application behind a proxy server using Robot Framework and Selenium2Library

泪湿孤枕 提交于 2019-12-23 02:00:54
问题 I'm testing a web application behind a proxy server using both Robot Framework and Selenium2Library. In fact when the proxy is enabled in browser connexion setting , the keywords "Open browser" failed when I disabled the Proxy server option , the browser windows is getting opened but i am not able to visit the application. This happen with both IE en ff driver. I want to know if there is any additional configuration to solve this problem? 回答1: The Selenium2Library documentation gives an

MSAA Fails to find winforms controls

喜夏-厌秋 提交于 2019-12-22 20:07:06
问题 I am using Coded UI to automate an application. In the automation process a complex process happens inside the application (loading a PowerPoint inside the application). After this process I can't continue the test because MSAA unable to find any controls in the application.I am using Inspect.exe, before and after the automation fails. I have attached the screen shot of Inspect tool before and after the failure. Is there any solution to overcome this issue? I can't continue automation testing

Error : Target failed to run: Permission to debug com.apple.Preferences was denied

拈花ヽ惹草 提交于 2019-12-22 17:05:46
问题 Run first test on Appium and I got a error in the logs. Appium version 1.4.13 xcode version 7.2 iOS settings with appium: http://screenpresso.com/=nD2Cf. Here is my java code: import io.appium.java_client.AppiumDriver; import io.appium.java_client.MobileElement; import io.appium.java_client.ios.IOSDriver; import io.appium.java_client.remote.MobileCapabilityType; import org.openqa.selenium.WebDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote