automated-tests

TestStack | How to find custom controls and invoke methods / fire events

两盒软妹~` 提交于 2020-01-11 13:55:09
问题 I have a custom Control HtButton which inherits from Control . I made a custom FrameworkElementAutomationPeer and override the OnCreateAutomationPeer() in HtButton . public class HtButtonAutomationPeer : FrameworkElementAutomationPeer { public HtButtonAutomationPeer([NotNull] FrameworkElement owner) : base(owner) { } protected override string GetClassNameCore() { return "HtButton"; } } public abstract class HtButtonBase : Control { } public class HtButton : HtButtonBase { protected override

Calabash Android: how to send app to the background (simulate device/hardware Home button)?

喜你入骨 提交于 2020-01-11 12:59:06
问题 Is there a way in Calabash Android where I can send my app to the background? In other words, simulate the device/hardware Home button? Secondly, can the app be brought back into the foreground? 回答1: This can be done in the following way: Then /^I go home$/ do system "#{default_device.adb_command} shell input keyevent KEYCODE_HOME" end P.S. You can also add sleep <some_value_in_seconds> if necessary, after system "..." line. 回答2: As far as I know, that action does not currently exist. You can

How to work while Selenium tests are working

半腔热情 提交于 2020-01-11 12:08:11
问题 When I write automated tests and run them (on my PC) I can not work until the tests are finished, because for example if I am coding the focus will jump out of visual studio to go to the web application under test viewed in web browser. Is there a way to prevent Selenium driver from stealing focus? 回答1: Not only you can't prevent the WebdDiver from taking the focus, you shouldn't do it. The WebdDiver needs the focus on the browser in order to successfully interact with it. If you take the

Move the headings from top of Cucumber's Data Table to side - Python

风流意气都作罢 提交于 2020-01-07 04:07:40
问题 I am looking for the ways to change the headings of Cucumber's Data Table to the side. So it will make the feature file readable. Ordinary way: | Name | Email | Phone No. | ......... | | John | i@g.net | 098765644 | ......... | It can be a very wide data table and I would have to scroll back and forth. Desired way: | Name | John | | Email | i@g.net | | Phone No. | 098765444 | . . . There are a small number of examples in Java and Ruby. But I am working with Python. I had tried many different

“Cannot perform 'Click' on the hidden control.” - Visual Studio 2012 only

試著忘記壹切 提交于 2020-01-07 03:01:08
问题 I'm recording a CodedUI test in Visual Studio 2012 and when I try to play back a simply "clik this link" recording, I get the following error. Message: Test method CancelSubmission.SubmitCancel.SubmitCancelMethod threw exception: Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnHiddenControlException: Cannot perform 'Click' on the hidden control. Additional Details: TechnologyName: 'Web' ControlType: 'Hyperlink' TagName: 'A' Id: 'CustomNav_lbBox4' Name: '' Target: ''

How to get test GCM tokens?

纵饮孤独 提交于 2020-01-06 15:49:49
问题 We have implemented a gateway service and push manager services to send push messages to GCM. Now we want to do some automated testing. How we can test GCM tokens? We can get some tokens from real devices and after sometime they might expire and tests will fail. To test positive and negative scenarios we need known valid and invalid GCM tokens. Any help guys? Thanks. 回答1: Okay, so I may have misunderstood the question, thinking that you were asking how to test registration tokens. If by test

How to get test GCM tokens?

假如想象 提交于 2020-01-06 15:49:07
问题 We have implemented a gateway service and push manager services to send push messages to GCM. Now we want to do some automated testing. How we can test GCM tokens? We can get some tokens from real devices and after sometime they might expire and tests will fail. To test positive and negative scenarios we need known valid and invalid GCM tokens. Any help guys? Thanks. 回答1: Okay, so I may have misunderstood the question, thinking that you were asking how to test registration tokens. If by test

What is this DalekJS error when I try to run a test via PhantomJS?

和自甴很熟 提交于 2020-01-06 07:26:13
问题 Every time I try to run a test using PhantomJS, Dalek gives me this error. However using GoogleChrome the test runs properly. Running tests /Users/user/node_modules/dalekjs/node_modules/dalek-browser-phantomjs/index.js:273 this.spawned.kill('SIGTERM'); ^ TypeError: Cannot read property 'kill' of null at Object.PhantomJSDriver.kill (/Users/user/node_modules/dalekjs/node_modules/dalek-browser-phantomjs/index.js:273:17) at EventEmitter.emit (/Users/user/node_modules/dalekjs/node_modules

Catching jQuery noty with Katalon Studio

依然范特西╮ 提交于 2020-01-06 06:18:11
问题 My AUT has a jQuery "noty" that appears after clicking on a button. ("Noty" is a jQuery plugin for message/notification creation.) The message stays on screen for a couple of seconds and then goes away. I'm afraid that's to fast for methods such as Katalon's 'WebUI.verifyElementPresent()' . Is there another way to catch it with Katalon Studio or Selenium ? 回答1: Yes, there is a way to handle this situation: import org.openqa.selenium.support.ui.WebDriverWait as WebDriverWait WebDriverWait wait

Fluent interface with protractor and typescript

我的未来我决定 提交于 2020-01-06 06:01:32
问题 I'm preparing project using protractor/typescript/jasmine. In other project we use java with fluent interface. I try to use it in this new project but I have a problem. On the bottom is error I get. Here is structure of it -Core --BasePage.ts -pages --LoginPage.ts -> extends LEPPage.ts --HomePage.ts -> extends LEPPage.ts --SearchPage.ts -> extends LEPPage.ts -LEPPage.ts (this is the part of page which is always displayed on each page - top menu and footer) -> extends BasePage.ts -tests --e2e