Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 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
Hello guys. I am facing an issue while creating protractor test with cucumber. I have 2 assertions in two different block. My first block assertion was failed (intentionally i make it as failed). My last then block was skipped.But I want to continue my all test steps even if it is pass or fail (then definitely i think i have to use soft assert).In testng we have a class called softassert. Is there something available here as well similar to that one. I am using chai package for assertion purpose
My step definition file
My result terminal. My requirement is it to execute all blocks whether if it pass or fail
Hello All,
Have quick question has anyone were able to fix this issue, I am getting this error in CI(jenkins)
Failed: ChromeDriver did not start within 5000ms
is there a way to install those drivers globally and point test runner(protractor) to use custom location chrome drivers
instead of node_modules/protractor/node_modules/webdriver-manager/selenium
hey there!! , I have an issue where the element identification fails on build pipeline but element is identified correctly on local machine. This is an element within a matt-dialog-container. The element is accessible when the container expands like below. Any suggestions how to access this element so it runs on headless browser?
Ok, I figured the issue is only on chrome headless. It works fine on mozilla headless. Can someone suggest me if this is a valid configuration for chrome?
I added —no-sandbox too. Without it, it wasn’t working since im using Docker. Im not sure if you will need it. As well, for some reason it only worked after i changed the window size. My test used to fail on some windows with some window sizes, and work with others...(im not at my desk currently, i can send you more info once im there...)
@gmoussayan thanks a lot, will try it out

So @Priyaa15 Im using below code for the headless chrome.

  capabilities: {
    browserName: 'chrome',

    chromeOptions: {

      //args: ['--no-sandbox', '--headless']
      args: ["--no-sandbox", "--headless", "--disable-gpu", "--window-size=1920x958"]//working
      //args: ["--no-sandbox", "--headless", "--disable-gpu", "--window-size=1280x648"]
      //args: ["--no-sandbox","--headless","--disable-gpu", "--window-size=1920x1080"]//working



As you can see, Im trying different window sizes, to see which one will work. So far, it worked with (1920x1080 & 1920x958), but failed with (1280x648). The tests are working perfectly on my local laptop, but when i run the test from Jenkins side, for some reason, it is sometimes passing and sometimes failing. Im still trying to figure out what is the reason...

@gmoussayan thanks, I will play around the window sizes that works. I was trying on vsts ci
This might help too: elgalu/docker-selenium#20
Hey guys. Got a question. When I tried to run my tests headless I seem to be getting logs in the console.
[0626/205925.925:INFO:CONSOLE(45943)] these appears everywhere. Any reason why and how to hide this? Thanks!

Hello guys, I was making a little protractor demo and the dev lead suggested to update the application html code to include a fixed 'attribute:value' pairs on all fields, so my test remains valid in case any change took place on any class, buttons names, etc...

so based on the above, i then, in my tests, I will be calling all elements on the application using the css locator (so all my tests will be written using by.css) in this way: element(by.css("tagname[attribute='value']")

the reason for this suggested change is to make our automated test stable, and not affected by any code changes...so im wondering if this is an acceptable practice? (I know that it will make my life much easier as an automation tester, but at the same time i'm finding it weird and i'm wondering if there are any disadvantages that im not yet aware of?) - let me know what you think
((Im thinking that such a change would put the app security at risk too, no?))

@gmoussayan Nice! That's correct. It's good practice. Rather than dealing with changing xpaths, it's advisable to get it by class, name, etc, in your case attributeName=value. Couldn't think of any disadvantage of it. However though, make sure that it's unique.
Yep, it will be unique, thanks @ninogomez
Ahmed Elshaikh
Hii All, I am facing an issue while run protractor test for 1st time, so i need your help plz as i am new in protractor
the error that i got shown in the image , and plz look into conf, package.json & spec.js
[16:38:15] E/configParser - Error code: 105
[16:38:15] E/configParser - Error message: configuration file conf.js did not export a config object
[16:38:15] E/configParser - Error: configuration file conf.js did not export a config object
    at ConfigParser.addFileConfig (/usr/local/lib/node_modules/protractor/built/configParser.js:141:19)
    at Object.initFn [as init] (/usr/local/lib/node_modules/protractor/built/launcher.js:93:22)
    at Object.<anonymous> (/usr/local/lib/node_modules/protractor/built/cli.js:226:10)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
Hello guys! any recommended good protractor tutorial?
@gmoussayan hi, what your dev lead suggested is a good practice (to use or not to use it always depends on a dev team - here i mean that if they are ready and want to update all the components to have a unique id/attr this is really cool).
@gmoussayan about protractor tutorial - for me the default http://www.protractortest.org/#/toc is probably one of the best
I see. Thanks for the info @artemrudenko
@gmoussayan you are welcome
We use Azure Devops, where you have a separate build and release stage
we would like to package the Protractor tests as another artifact in the buil stage
and then use this package in the release pipeline to run e2e tests against the deployed location
if the tests succeed the application is automatically deployed to the next environment
unfortunately we are not able to create an environment ad hoc to run the tests for every build
so we would like to be able to run a command like npm run build:e2e which would create an e2e/dist folder that contains a ready to go .js file that you can run with one command
@wilgert should it be ng serve which brings up the instance/app and then run npm run e2e for tests?
Wilgert Velinga
No it should run the tests against a deployed version of the angular app and a deployed version of the backend. So we have true e2e tests.
but i want to do it in the release pipeline, where the input is a zipped /dist folder containing the angular app
in the release pipeline I do not want to checkout the repo again, install dependencies and run protractor
i would like to be able to create a zip containing everything needed to run protractor as a node script
we already run the protractor tests with a mock backend on every commit in the build pipeline to verify the angular app
Mayank Verma
Hi all, How can I check if the element has active in its classname?
In JavaScript, there is hasclass
Is there anything like that in typescript too?
Thimmaraju G
Hi All ..how do i run autoit exe file is protractor script.
@mayankverma24 you can try smth like this
    const classes = await el.getAttribute('class');
    const isActive = classes.split(' ').indexOf('active') > -1;
   // Or
   isActive = classes.includes('active');