Protractor supports Windows Authentication pop up?

Is there a way that Protractor supports windows authentication pop up for IE and Chrome, this doesn't work for my application, "http://username:password@server.url/", are there any alternate ways through which we can handle windows pop up.

Protractor Expected '33990Times Jobs' to be greater than 0

My code: var listItemText = element.all(by.css("")).get(0).getText() .then(function(text){ return text.replace(/[\r\n]/g, "") }) expect(listItemText).toBeGreaterThan(0); How to compare if string is number with texts should be greater than 0 in protractor.

I'm not able to run protractor test in firefox but in chrome it runs fine

When I am trying to run Protractor e2e test in firefox, it launches the browser but my test scripts do not get executed. I am using windows Server 2012 R2 machine with firefox version 46.0.1 and Selenium 2.53.0. It gives me the following error: Using FirefoxDriver directly... [launcher] Running 1 instances of WebDriver code\ui\dgui\node_modules\protractor\node_modules\selenium-webdriver\http\util.js:89 Error('Timed out waiting for the WebDriver server at ' + url)); ^ Err

Unable to debug protractor scripts using browser.debugger()

I use terminal for execution & debugging scripts; Actually I am unable to debug through browser.debugger(); but the same is achieved through browser.pause(); I entered below cmd for execution followed by 'repl' and then tried to enter protractor cmds but it fail to work :( protractor debug protractor-config.js; Note: the execution actually pause on breakpoint but unable to debug it like what we do on browser.pause() Is there a better approach to debug using browser.debugger(); ?

Run protractor test script in multiple nodes (os platform) via selenium grid

I am currently trying to run Protractor test script using selenium grid. My goal is to distribute Protractor test scripts to multiple nodes running under different flavor of OS. It should also run different parts of test script in parallel to save execution time. Current setup works when I use webdriver-manager to distribute test with multiple instances, but webdriver-manager would let me use only one node. I know it's possible to overcome this issue with selenium grid, but I am having following

Protractor still not available after global npm installation

Now I'm having other issues where Protractor is not found after installing using npm -g . Some background: I was previously having issues with npm installs, but it works now that I have set the correct proxy settings at the client site - i.e. .npmrc file exists under c:\Users(myUserName) which contains the registry and proxy keys. For example, I install Protractor as follows : C:\Projects\prot-test>npm install -g protractor C:\Users\...\AppData\Roaming\npm\webdriver-manager -> C

Protractor Set a unique ID when running sharded tests

I'm sharding (running in parallel) my Protractor tests and am storing each test's result in a database. I need a way to tie all the tests from a single test run together. The plan was to set an id in the config and include it in DB. Problem is, the config gets re-run for each sharded test (ie. multiple times)... so I end up with multiple IDs. No bueno. So, anyone have an idea on how I might set a single, unique id, once at the beginning of a sharded test run? Update: To clarify, I was hoping

Protractor Process exited with error code 1

Why test run fails in below case using protractor conf.js exports.config = { framework: 'jasmine', seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['example_spec.js'] } example_spec.js describe('LoginGUI App Test', function() { it('LogInToGUI', function() { browser.get(''); browser.waitForAngular(); element(by.model('user.username').sendkeys('')); element(by.model('user.password').sendkeys('abc12

Protractor not installed now with npm

I tried to install the protractor globally with npm install -g protractor Here is the error message,I got it in every case. I installed globally the protractor before,and worked well. npm WARN errno: -4048, npm WARN code: 'EPERM', npm WARN syscall: 'lstat', npm WARN path: 'c:\\x\\y\npm\\node_modules\\protractor\\node_modules\\web driver-manager\\node_modules' } npm ERR! path c:\x\y\npm\node_modules\protractor\node_modules\.webdriver-man ager.DELETE\selenium\chromedriver_2.26.exe npm ER

Protractor Attaching text or image to Cucumber report from after hook throws error

The code works fine inside step definitions but not in after hook. Below is my after hook code. It fails when I call attach function on world. var {defineSupportCode} = require('cucumber'); defineSupportCode(function({After, Before, BeforeStep, StepResult}) { After(function(scenario,done) { console.log('after'); const world = this; if (scenario.result.status === 'failed') { browser.takeScreenshot().then(function (stream) { // writeS

Protractor Reusbale Function for boundary value analysis

is there any smart solution/reusable function to test the boundary value analyis.. for example : test the email text box accepting @ ,A-Z , a-z , .com, .org etc firsnt name txt box should accept all charactor ,utf-8 characters set and max and.min length ....

Protractor Not able click on a element after hovering in chrome

I am trying to click on a element which is visible only after hovering. browser.actions().mouseMove(element(by.css(".frx-mywork-main-block .frx-mywork-main-body-block3"))).perform(); browser.sleep(5000); element(by.css(".frx-mywork-main-block .frx-mywork-main-overlay .frx-mywork-main-overlay-body div:nth-child(2) span i")).click(); The class 'frx-mywork-main-overlay' is visible only after the hovering.The action hovering is successfully done while running the script, but it failed on clickin

Protractor handshake failed when connecting to local server with https protocol

I am trying to write protractor test but my application connects to WLS server which uses TEST certificates to authenticate for further communication. I have no option for webdriver update because of my company policy.So I have downloaded chrome driver and using it. Protractor : 5.4.2 Chrome: 74.0.3729.169 Chrome Driver: chromedriver_74.0.3729.6_win32 // Protractor configuration file, see link for more information // const {S

Protractor how to validate Drop Down Selected Value with Reactive Forms

How can I validate selected value of dropdown with Reactive forms, I do not see any specific attribute on HTML page, when any value is selected in dropdown : <span class="content"> <select formcontrolname="template" id="template" required="" ng-reflect-required="" ng-reflect-name="template" class="ng-pristine ng-valid ng-touched"> <!--bindings={"ng-reflect-ng-for-of": "[object Object],[object Object"}--> <option value="81ef59b7-fadb-4bfa-b521-e88819469988" ng-reflect-

Testing Angular Web components(Custom Elements) with protractor

When we use the angular custom element tag in the index.html and run our e2e tests using protractor, it causes timeout as angular is not found in the page as for Angular web components there are only entryComponents and no bootstrap component. Because building the angular application for deploying as a custom element doesn't need bootstrapping of component.

Protractor - how to restart browser between certain specs?

I have specs for subscriptions: with Facebook without Facebook For specs with Facebook subscription I have to turn on restartBrowserBetweenTests: true to clear browser cache from previously entered Facebook emails and passwords. For other subscriptions I have to turn restartBrowserBetweenTests off manually, every time. Is there any way in Protractor to restart browser only between certain specs? Thanks!

Is it possible to print a text message, if condition is not satisfied in protractor?

My code: this.condition = function() { element(by.partialLinkText('Times Jobs')).isDisplayed().then(function (result) { if (result) { element(by.partialLinkText('Times Jobs')).click(); } else { console.log('Times source not found') } }); } If "Times Jobs" is not presented in the page then it should display whatever text inside the else statement. How can i do that? I don't want to make test fail, just i n

Protractor not able to execute else part of my code when element is not displayed/present

I always identify element on my screen with isDisplayed/isPresent and then add if/else to perform further test. But else part of the screen never get executed and get error like "Failed: Index out of bound. Trying to access element at index: 0, but there are only 0 elements that match locator By(css selector," on console log. Test_PO.js is as follow, var ProfilePO = function(){ this.Setting = element.all(by.css('

Protractor: asynchronous script timeout: result was not received in 11 seconds

I'm facing a problem from one of my tests when executing them. I'm testing a non-angular site written on aurelia. I've set some configurations regarding the timeouts and to ignore synchronization. Still I'm facing the timeout problem - the stack trace is added at the end of the post. Here is my setup: Protractor: 4.0.9 protractor.conf.js: exports.config = { directConnect: true, // Capabilities to be passed to the webdriver instance. capabilities: { 'browserNa

Protractor Angular could not be found on the page with angular application while running test for angular app in iFrame

I have an angular application running inside iFrame. I must need to launch parent application URL as it provide some flag which makes angular app working as expected. Now I need to write protractor tests for angular app in iFrame. Here is the code. describe('French page', function() { var IFRAME = "iframe", TITLE_FR = 'Découverte automatique', PAGE_URL = '/SAAS/admin/app/page', pagePaths = browser.params.paths;; beforeEach(function (done) { LOGIN_PAGE.goToPageAndLogin().then(function (){

Protractor TypeError '2019' is not thenable

I wanted to create a cucumber test step with protractor,but I got in the expect step the '2019' is not thenable. Here is my source code: this.Then(/^I check that the calculated year from the current month\(if current month >= 6 ==> current year = current year \+ 2,else current year = current year \+ 1\)$/,function(callback) { var actualDate=new Date(); var actualYear=actualDate.getFullYear(); var actualMonth=actualDate.getMonth()+1;

Protractor - get result of sendChromiumCommand

The goal: obtain a result of chromium command execution, e.g. Profiler report data What I've done: I'm able to call chrome devtools command using browser.driver.sendChromiumCommand. E.g. await browser.driver.sendChromiumCommand('Page.reload', {}) reloads page, so I can confirm that this is working. The problem: the result of any command execution is always null Here is my code describe('Protractor Demo App', function() { it('whatever', async function() { await browser.get('http://juliemr.g

How to add custom logs in Protractor test reports

I'm trying to add some custom logs to my protractor test report. I've app log file in my project folder which has the logs captured using log4js. I want these log entries to be shown in my test report as well. Currently I'm using chercher report. Since I'm a beginner to protractor, I'm not sure how to do this. Can anybody help me on this? Thanks in advance! spec.js fdescribe('Protractor Perfecto Demo', function () { it('should pass test', function () { browser.reportingClient.stepStart('Step 1

Protractor e2e testing

I am writing Protractor e2e testing .I need to Dynamically read the values from Excel .Can anyone help me out from this..

Protractor manipulate scripts in the page

I am using protractor for e2e testing, and I am new to protractor. I am testing a specific library for different scenarios, and for all of those scenarios I need to create a test page. I am thinking of automating that process. My question is: Is there a possibility to inject different permutations of a script to create all of my test pages automatically? Example: I want to comment and uncomment the flexible codes for different test pages and create all the permutations possible as: 1)comment b

Configuring Protractor with WebStorm

I am new to Protractor and WebStorm. Please help me in configuring Protractor with WebStorm and executing scripts successfully. I did try to configure, but then it does not identify sendKeys function.

Protractor tests run instable ( ETIMEDOUT )

We are working to make our Protractor E2E tests stable, so our development and deployment flow can depend on it. However, until now we are not able to have a fully stable run of E2E tests. Sometimes, inconsistent which, some test somewhere is failing due a ETIMEDOUT in ClientRequest in selenium-webdriver. Failed: ETIMEDOUT connect ETIMEDOUT Stack: Error: ETIMEDOUT connect ETIMEDOUT at ClientRequest.<anonymous> (/var/lib/jenkins/workspace/HPS

protractor console shows different than elementor console

this is code. protractor console shows a long text yyyy { ptor_: { setFileDetector: [Function], launchApp: [Function], controlFlow: [Function], schedule: [Function], getSession: [Function], getCapabilities: [Function], quit: [Function], actions: [Function], touchActions: [Function], executeScript: [Function], executeAsyncScript: [Function], call: [Function], wait: [Function], sleep: [Function], getWindowHandle: [Function

Protractor Unexpected end of JSON input using cucumber-html-reporter

I am using Protractor and cucumber-html-reporter to try generate a HTML report. So, in the hooks I have the following: const {defineSupportCode} = require('cucumber'); const path = require('path'); const reporter = require('cucumber-html-reporter'); defineSupportCode(function({After, Before}) { After(function () { var options = { theme: 'bootstrap', jsonFile: path.resolve( __dirname + '/../../report/cucumber.json'), output: path.resolve( __dirname + '/.

mail-listener2 in protractor does not fetch mails until marked seen/unseen in outlook

i made a test with protractor and mail-listener2, which waits for an email (imap) That worked long very well without problems - but now there is a strange effect: Protractor does not get a mail. But it does, if I open outlook, fetch the mail there, mark it as seen and then unseen again. In the moment, I mark it unseen again, the mail-listener gets the email and Protrator can work with it. I doubt whether I have changed any settings of the maillistener (i tried with an old version, too) I think

Not able execute protractor scripts due to this error "Cannot set property 'wrapCompare' of undefined"

When I am executing test scripts using protractor, It throws the below error. Error: TypeError: Cannot set property 'wrapCompare' of undefined Node Version: 6.4.1 Protractor Version: 5.4.2 Browser(s): Chrome74.0.3729.108 Operating System and Version Windows Conf.js: exports.config = { //seleniumServerJar: '/usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.3.1.jar', seleniumAddress: 'http://localhost:4444/wd/hub', //directC

protractor chromedriver version (CLI vs VSC) error

I had error because of using old chromedriver. So I used: webdriver-manager clean webdriver-manager update webdriver-manager status To update and verirfy chromedriver version 89.0.4389.90 If I run protractor from command line, all tests passed. So OK. But If I run protractor from visual studio mode pressing F5 (debug). I am faced to this error: E/launcher - Error: SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 87 Current browser version

Protractor Then not executing after browser.wait

I am trying to use Protractor for our application. Unfortunately, the initial login page is non-Angular so I'm having to handle all the implicit waits with ExpectedConditions. In the below code snippet, the click() is never executed. Instead, the test times out waiting for the next page to show. In the console output (also pasted below) I see the the link was found, but I don't see the subsequent click action. var signUpLink = element('sign-up-link')); var isLinkClickable = EC.element

Protractor debugging fails in webstorm

Protractor test runs successfully, but fails to debug. When ever I run the it launch the browser, and the fails. Debugger listening on port 56547 Starting selenium standalone server... [launcher] Running 1 instances of WebDriver Selenium standalone server started at Process finished with exit code -1073741819 (0xC0000005) Any Idea ? Protractor version is 3.3.2 Selenium is 2.25.2

Protractor Dealing with & , 's and space between words

How do we handle "&" and " 's " " space" to find elements? These elements can't be found. Examples: element(by.xpath("//hs-details-item[hs-label='Jack Daniel's 50ml']//hs-spin/span[2]")).click(); element(by.xpath("//hs-details-item[hs-label='M&M's']//hs-spin/span[2]")).click(); element(by.xpath("//hs-details-item[hs-label='M&Ms Pretzel']//hs-spin/span[2]")).click();

Protractor Not able to navigate from Non-angular page to angular page in iframe

I am trying to automate angular app with in the facebook. I am able to successfully login to facebook, but whenever i try to navigate to the angular page within the iframe, it keeps kicking me out with this error message "Error while waiting for Protractor to sync with the page: "window.angular is undefined. This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping." Spec it('Test', functi

How to run protractor with different config file in sequence?

I have different configuration file for protractor, and I would like to create a gulp task which run protractor for each config file in sequence. Here is my actual code: gulp.src('conf/protractor.conf.*.js') .pipe($.debug()) .pipe($.foreach(function(stream, file){ var configFileName = path.join('conf/', path.basename(file.path)); console.log(configFileName); gulp.src(path.join(conf.paths.e2e, '/**/*.js')) .pipe($.protractor.protractor({

Protractor How can I invoke end to end tests at the command line without having to firstly execute ng serve

According to the angular cli documentation is it necessary to execute ng serve before invoking ng e2e if you want to execute end to end tests. It would be more convenient to execute ng e2e only. How would I go about executing the end to end tests without having to first execute ng serve? I found the following similar question, but I'm not using gulp How to run e2e tests in teamcity, How to run the server in the background and run e2e

Protractor upload stuck when filesearch pops up

I'm trying to figure out what's wrong with the code below: it('should upload a photo', function(){ var photo = './photos/et-test.jpeg', exactPhoto = path.resolve(__dirname, photo); var form = element('fileupload')); var upload = element(by.css('input[type = "file"]')); var addFiles = element(by.cssContainingText('.btn.btn-success.fileinput-button.mb-10','Add files...')); var uploadBtn = element(by.css(''));

protractor can not recognize css web element which java and selenium can

Hi I'm getting error when trying to click on the css web element. Error: - Failed: No element found using locator: By(css selector, .fuse-search-bar-expander) It is angular web page and exactly the same element I can locate in java with selenium like: driver.findElement(By.cssSelector(".fuse-search-bar-expander")).click(); I can not do it with protractor in javascript (due to error). My code: await element(by.css(".fuse-search-bar-expander")).click(); Already tried options like, withou

Protractor Get ChildElement without using element selector

I am using a protractor to get the text in the second Div within #myDiv. Can someone please advise how can I get a text from the second Div (complete Text) which is 'This is a sample text'. I tried getting text in #myDiv but it adds spaces before the phrase. I want to exactly get the text from the 2nd child element of the after #myDiv. <div id='myDiv'> <span> (this is second div) <a name="aTag"></a> <madcap:concept term="DoSomething">

Angular Testing - Using Jest with Protractor

I am new to Angular testing, and I want to perform 2 kinds of test for my application: Unit Test - I choose to use Jest since I can run my test without opening the browser, and it also supports testing for specific cases with --testNamePatern. End to end test - I want to try out Protractor since it is available in Angular and also has a big Angular community to work with. My question is, can I use both Jest and Protractor in my application? If yes, do I need to configure anything to use both

  1    2   3   4   5   6  ... 下一页 共 6 页