Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 19:00
    tfaron commented #5133
  • Jan 31 2019 07:28
    cnishina closed #5135
  • Jan 31 2019 07:28
    cnishina commented #5135
  • Jan 30 2019 16:23
    ThabisoGithub closed #5136
  • Jan 30 2019 16:23
    ThabisoGithub edited #5136
  • Jan 30 2019 16:23
    ThabisoGithub edited #5136
  • Jan 30 2019 16:21
    ThabisoGithub opened #5136
  • Jan 30 2019 16:18
    IgorSasovets commented #4177
  • Jan 30 2019 15:05
    andrewchan-clover commented #4177
  • Jan 30 2019 13:43
    IgorSasovets commented #5135
  • Jan 30 2019 12:37
    EnzDev edited #5125
  • Jan 30 2019 11:47
    akshaymondal opened #5135
  • Jan 29 2019 14:33
    uinest commented #4822
  • Jan 28 2019 21:38
    cnishina commented #5132
  • Jan 28 2019 21:37
    cnishina commented #5134
  • Jan 28 2019 21:37
    cnishina closed #5134
  • Jan 28 2019 21:36

    cnishina on selenium4

    chore(release): bumpb version t… (compare)

  • Jan 28 2019 11:30
    think4ideas opened #5134
  • Jan 28 2019 11:01
    toniedzwiedz commented #2735
  • Jan 28 2019 09:42
    azorrozua commented #4786
StanislavKharchenko
@StanislavKharchenko
@cnishina, can we also expect to have protractor dependency updates? E.g. selenium 4.0-alpha (current 3.6) or webdriver-manager 12.1.8 (current in protractor 12.1.7). Now I see that even these requests and issues on github are ignored. Thanks in advance
Craig Nishina
@cnishina
@StanislavKharchenko I am working on something else right now. This is up to the angular team. The work to upgrade selenium webdriver 4 alpha was done a couple of years ago but it was rolled back.
manudee
@manudee

hey everyone, my protractor tests were working fine on version 7 and wedriver-version 12.1.8 so far but after today I suddenly started seeing this error. The individual jasmine specs seems to pass but I did not get this error until today.

(node:75637) UnhandledPromiseRejectionWarning: Error: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are 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.  See http://git.io/v4gXM for details"
    at runWaitForAngularScript.then (/Users/sukthankar/Documents/manager_web_test_automation/node_modules/protractor/built/browser.js:463:23)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:75637) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with.catch(). (rejection id: 1)
(node:75637) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:75637) UnhandledPromiseRejectionWarning: Error: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are 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.  See http://git.io/v4gXM for details"
    at runWaitForAngularScript.then (/Users/sukthankar/Documents/manager_web_test_automation/node_modules/protractor/built/browser.js:463:23)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:75637) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with.catch(). (rejection id: 2)

also seeing json formatting error on my tsconfig.json under node_modules/protractor. wondering if that is related. I am using waitForAngular(false) before my tests run since we have outstanding http requests that keep polling as a part of our app. If there any workaround for the above error, please let me know. Thanks.

this is the tsconfig file showing error, but to me the json looks fine
image.png
I have tried removing the node modules and did a clean install as well but did not help so far
Raj
@rajjaiswalsaumya
Hi all, i am facing wiered issues with protractor, which causes builds to fail randomly. When we run the build again it passes. At times selenium driver does not close and fails builds. What is the right way to fix it
Craig Nishina
@cnishina
@rajjaiswalsaumya this probably means that you did not properly await a promise or your tests are written in a flaky way that causes them to fail.
Stefan Bley
@sbley

Probably will have more info some time Q2-ish?

Hi Craig. Will this include a roadmap to support for Selenium 4?
In my organization we are at a point where we have to decide whether we give up on Protractor and migrate to other tools (like MS Playwright). We see the risk that modern browsers will not support JsonWire anymore but only W3C WebDriver protocol, forcing us to use Selenium 4 based tooling.

1 reply
chandrashekar9
@chandrashekar9
Hi i wanted to open a link in incognito window does any one have idea about this?
StanislavKharchenko
@StanislavKharchenko
@cnishina I know that @angular team are Protractor owners, but I don't know how to contact them. I think you could help with us with this, especially in question regarding Protractor upgrades with selenium 4, which is already in beta-1 state. I think all protractor community would like to know about at least an approximate road map. We understand that Angular team very busy now, but any information will help us. Thank you!
Chris Oliver
@chriso86

Hello. I hope you're all well. Please may somebody assist.

I have been using the browser.actions().mouseMove(el, {x: 0, y: 150}) to attempt to scroll within a div on a page, but the offset isn't working...
I have a fixed footer, hence the reason I need a vertical offset, however it just ignores the y offset completely. There is more than enough feed below the element to scroll.
Oddly a negative value does work.

I have also attempted to use browser.wait(ec.visibilityOf(ef), 10000).then(() => //logic), however the promise resolves without the element being visible within the viewport... so I'm guessing that this is evaluating the theoretical visibility according to the painted presence of the element, and doesn't account for the viewport.

Why is scrolling such a problem? This seems like it should be a common issue, but I'm not finding much info surrounding scrolling in Protractor's actions wrapper API implementation.
Is it just me? You can be honest. Haha.

Chris Oliver
@chriso86
Just to clarify, this is the way I'm using the offset on mouseMove:
browser.actions().mouseMove(el, {y: 300, x: 0}).perform()
StanislavKharchenko
@StanislavKharchenko
@chriso86 Found this issue, see comments under it angular/protractor#4970 However it closed. Also, there some interested comment regarding w3c parameter. Maybe it depend on it, but for browser.actions couldn't be used with new w3c mode in protractor.
Chris Oliver
@chriso86
@StanislavKharchenko Thanks for your reply! :) I actually did see that issue on the repo. The strange thing is that I don't have a chrome.conf.js, and I'm using Protractor (v.7) as it comes baked into Angular (v.10).
Do you maybe know if w3c mode is implicitly enabled in these later versions?
StanislavKharchenko
@StanislavKharchenko
@chriso86 w3c enabled by default started from chromedriver 75 (if you using it) and edge. I think in your case it disabled, since browser.actions API are not available with w3c mode and using it lead to exceptions. Protractor still require further support and I hope upgrades with selenium-webdriver 4.0, but for now, unfortunately, new Protractor repo owners ignore any issues and questions.
Chris Oliver
@chriso86
Thanks for your reply, @StanislavKharchenko.
It's a pity that its fallen into such a bad state of support and maintenance.
I'm just using executeScript with el.scrollTo for now, and it works alright.
Thanks again for your help!
Andy Milbeck
@amilbeck
On the w3c discussion, I just updated the selenium hub and node docker images we are using to run our tests. The last time I updated was July 2020. With the earlier images chromeOptions: { w3c: false } worked fine. With the 3.141.59-20210311 images it no longer works. I had to switch to 'goog:chromeOptions': { w3c: false } before I could get it to work again.
himmu0410
@himmu0410
Hi every one,how can i read gmail messages through protractor and jasmine? please help me out
4 replies
himmu0410
@himmu0410
@JS31096
Jan Molak
@jan-molak
Hey Folks, if you're using protractor-cucumber-framework on any of your projects, then please upgrade it to version 8.0.0. This latest version has replaced the old integration and reporting engine with Serenity/JS while retaining backwards compatibility. You'll also get support for Cucumber.js v 7 (and all the previous ones), as well as support for both the native Cucumber.js reporters and Serenity/JS reporters. Thoughts and feedback welcome! I typically hang out on the Serenity/JS channel - https://gitter.im/serenity-js/Lobby
Sri Harsha
@harsha509
you can use google gmail api to read messages https://developers.google.com/gmail/api
Sri Harsha
@harsha509
Hi There, Just want to know about protractor project. Protractor is a great tool to test angular apps. but it been 18-20 months the repo has no new changes and fixes/releases. as the browsers are becoming more w3c complient and legacy jsonwp methods will break( i can see few users already facing issue with legacy scripts) but is there any future plan to update the repo and make w3c compatible ?
25 replies
saikrish06
@saikrish06
I have an issue here. I need to access the leemtn at particualr index and perform expect on that element but it is printing all the elements
this.verifyNotificationsAndMessageByModule = function (moduleName, messageText) {
    element.all(by.xpath("(.//strong[text()='" + moduleName + "']/parent::a/parent::h4/parent::div/following-sibling::div/div/ul/li/h6/span)")).each(function (elem, index) {
        elem.getText().then(function (elTxt) {

            if (elTxt.includes(messageText)) {
                console.log("Complete Text at" + index + " ->" + elTxt);
                return true;
            }
            else {
                browser.actions().sendKeys(protractor.Key.ARROW_DOWN).perform();
            }
        });            
    });  
};
the output is
Complete Text at3 ->Archival for year: 2040 completed successfully
Complete Text at4 ->Archival for year: 2040 completed successfully
Complete Text at5 ->Archival for year: 2040 completed successfully
Complete Text at6 ->Archival for year: 2040 completed successfully
Complete Text at7 ->Archival for year: 2040 completed successfully
Complete Text at8 ->Archival for year: 2040 completed successfully
Complete Text at9 ->Archival for year: 2040 completed successfully
Instead the logic I need is once it finds the first maching text it should there and print it..and also I can expect on the same
Please help with me
Craig Nishina
@cnishina
elemArr = element.all( ).filter((elem) => { return elem.getText().then(txt => { return txt === messageText }});
firstEl = elemArr.first()
something like that?
You can filter on an element array to get an element array that matches the xpath + has the text you want.
then get the first element.
mcroker
@mcroker

I'm having an issue where protractor successfully launches chrome and executes tests the first time after I reboot, and then subsequently fails with

[13:48:00] I/launcher - Running 1 instances of WebDriver
[13:48:00] I/direct - Using ChromeDriver directly...
[13:48:01] E/launcher - socket hang up
[13:48:01] E/launcher - Error: socket hang up
    at connResetException (internal/errors.js:570:14)
    at Socket.socketOnEnd (_http_client.js:440:23)
    at Socket.emit (events.js:215:7)
    at endReadableNT (_stream_readable.js:1184:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
[13:48:01] E/launcher - Process exited with error code 199
chromedriver_89.0.4389.23.zip
Google Chrome 89.0.4389.90

Any thoughts on where to even start looking greatly appreciated...

mcroker
@mcroker
Hmmm.... the plot thickens... restarting my firebase emulator resets the above issue. Guess it's not as I first suspected a webdriver issue.
Raymond Barlow
@raymanoz
Hi
does anyone know why the imported protractor would be undefined?
I'm using it in a serenity-js spec, similar to the example setup that they do, but for some reasons is undefined when I try to use it
import {protractor} from 'protractor';
:
BrowserTheWeb.using(protractor.browser),
when I get to the last line, TypeError: Cannot read property 'browser' of undefined
3 replies
mcroker
@mcroker
If it helps my import statement is
import { protractor } from 'protractor/built/ptor';
StanislavKharchenko
@StanislavKharchenko
@raymanoz Use import { browser } from 'protractor';
Jan Molak
@jan-molak

Hey folks, I've just created a new demo project showing how to use protractor-cucumber-framework to produce Serenity reports:

Thoughts and feedback welcome!

Krishna Kumar Singh
@kwishna
Hey Guys, Can We Integerate Protractor With Jest? Please share any article or demo project if you have.
ArtemRudenko
@artemrudenko
Future of Angular E2E & Plans for Protractor angular/protractor#5502
Craig Nishina
@cnishina
My new library (that I keep saying will eventually happen) runs some of my tests in Jest and some of my tests in Jasmine. Some good news is that I have had some engineering time to work on it (like until I am done which is really exciting).
StanislavKharchenko
@StanislavKharchenko
Hello, Craig! Thanks for job! Do Angular or Google include Arctangent to common roadmap and support it? angular/protractor#5502 - looks like that Angular guys just want to throw out the e2e and leave everyone with own headache, IMO.
Craig Nishina
@cnishina
I am trying to find a good home for it in a GitHub under a Google org and I'm working on roadmaps for internal users and external community.
Jan Molak
@jan-molak
Hey folks, Serenity/JS will continue to support Protractor and also provide dedicated modules for other Web testing tools; you can vote on which one you'd like to see first at https://twitter.com/SerenityJS/status/1379368915017592835?s=20
Krishna Kumar Singh
@kwishna
I am trying to automate an 'angular' application.I am getting 'script timeout' if don't put 'browser.waitForAngularEnabled(false)' in code.
Craig Nishina
@cnishina

wait for angular waits for angular to exit the zone. If your app does not exit the zone, the page will keep waiting and your script will timeout.

it is perfectly fine to not wait for angular. Just know that you should put browser.waits to wait for an element to appear on the page on load instead.