protractor

Protractor test a bootstrap modal - not angular page - timeout

☆樱花仙子☆ 提交于 2019-12-30 10:39:26
问题 I'm trying to UI test a bootstrap modal which has not used an angular plugin, it is a vanilla bootstrap modal. I get this error: Failed: Timed out waiting for asynchronous Angular tasks to finish after 11 seconds. This may be because the current page is not an Angular application. Please see the FAQ for more details: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular While waiting for element with locator - Locator: By(css selector, h2.modal-title)✗ Is

Protractor test a bootstrap modal - not angular page - timeout

自古美人都是妖i 提交于 2019-12-30 10:39:04
问题 I'm trying to UI test a bootstrap modal which has not used an angular plugin, it is a vanilla bootstrap modal. I get this error: Failed: Timed out waiting for asynchronous Angular tasks to finish after 11 seconds. This may be because the current page is not an Angular application. Please see the FAQ for more details: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular While waiting for element with locator - Locator: By(css selector, h2.modal-title)✗ Is

What line is causing this Protractor error?

一个人想着一个人 提交于 2019-12-30 09:41:48
问题 Is there a way for Protractor to show in the console log what line the error occurred on? I just get this type of message: Message: Failed: Cannot call method 'click' of undefined Stack: Error: Failed: Cannot call method 'click' of undefined at /usr/local/lib/node_modules/protractor/node_modules/jasminewd2/index.js:104:16 at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15 at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/usr

Protractor: Find Element by Attribute

天涯浪子 提交于 2019-12-30 08:00:28
问题 I have the following element i need to find for testing: <div class="alert alert-danger" role="alert" ng-show="notValid">Zugangsdaten eingeben</div> How can i find this element to check visibility (ng-show)? The ng-show attribute and value are the only attribute and value to identify the element uniquely. The class is used in many elements... I am searching for something like: var notValid = element(by.Attribute('ng-show', 'notValid'); 回答1: You can find it by.css(): element(by.css('div[ng

protractor config file is not picking up the cucumber step definitions

≡放荡痞女 提交于 2019-12-30 07:33:09
问题 i am new to protractor and cucumber framework. i followed the steps from protractor site and here https://semaphoreci.com/community/tutorials/getting-started-with-protractor-and-cucumber. i have a config file configured with cucumber framework options, feature file and step definition file. But when i run my cucumber-config file it does not recognize my step definitions and always throw an error. any help on this? below are my setup files. //cucumber-config.js exports.config = {

Protractor how to test select2

我的未来我决定 提交于 2019-12-30 07:16:23
问题 I have a select2 drop-down where you need to first enter 2 characters and then select your item. I am unable to test this with Protractor. var select2 = element(by.css('div#s2id_person')); select2.click(); select2.sendKeys('ip'); select2.sendKeys(protractor.Key.ENTER); The following gets an error about being unable to focus the element when you try to sendKeys. 回答1: The following snippet successfully activates and selects the first option in a select2 widget, it allows for loading options

with protractor how to setup internet explorer configuration?

这一生的挚爱 提交于 2019-12-30 06:08:28
问题 I am using protractor 1.3.1 and running iedriverserver.exe 2.43.0.0 with IE11 installed (windows). This is my spec: describe('quick test IE driver', function () { it('should go to ng homepage', function () { browser.driver.get('https://angularjs.org/'); var title =element(by.css('h1')).getText(); expect(title).toBe('HTML enhanced for web apps!'); }); }); And this is my protractor.conf.js: exports.config = { // The address of a running selenium server. //seleniumAddress: 'http://localhost:4444

with protractor how to setup internet explorer configuration?

孤人 提交于 2019-12-30 06:07:10
问题 I am using protractor 1.3.1 and running iedriverserver.exe 2.43.0.0 with IE11 installed (windows). This is my spec: describe('quick test IE driver', function () { it('should go to ng homepage', function () { browser.driver.get('https://angularjs.org/'); var title =element(by.css('h1')).getText(); expect(title).toBe('HTML enhanced for web apps!'); }); }); And this is my protractor.conf.js: exports.config = { // The address of a running selenium server. //seleniumAddress: 'http://localhost:4444

How do I parameterize the baseUrl property of the protractor config file

自作多情 提交于 2019-12-30 05:40:29
问题 I need to run my protractor tests in different contexts with different baseUrl s in the config files. I don't want to use separate config files for each situation since that is more difficult to maintain. Rather, I want to pass the base url in as a command line parameter. Here is what I have tried so far: The protractor.conf.js: exports.config = { onPrepare : { ... exports.config.baseUrl = browser.params.baseUrl; ... } } And to invoke protractor: protractor protractor.conf.js --params.baseUrl

Is there a way to run particular Protractor test depending on the result of the other test?

假如想象 提交于 2019-12-29 10:02:48
问题 This kind of question has been asked before but most of this question has pretty complicated background. The scenario is simple. Let's say we are testing our favorite TODO app. Test cases are next: TC00 - 'User should be able to add a TODO item to the TODO list' TC01 - 'User should be able to rename TODO item' TC02 - 'User should be able to remove TODO item' I don't want to run the TC01 and TC02 if TC00 fails (the TODO item is not added so I have nothing to remove or rename) So I've been