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
cedvdb
@cedvdb
@gmoussayan hi
ArtemRudenko
@artemrudenko
@gmoussayan hi
@cedvdb looks not but i'd update last rows to :
await browser.wait(async () => await EC.visibilityOf(page.errorElem), 10000, 'Element is not visible');
expect(await page.errorElem.getText())
    .toEqual('Incorrect credentials');
Ramesh Kumar
@calystoramesh
Hello All,

From Login screen when I clicked "Register" link , it's redirect to another angularJS project ( baseurl/register).
in script :

navigatetoRegScreen(){
return this.getLoginScreenLoaded().element(by.css('.rgt-sec a')).click().then(function(){
return browser.driver.wait(function () {
return browser.driver.getCurrentUrl().then(function (url) {
return /register/.test(url);
});
}, 50000);
});
}

URL is redirected but page is not loaded . do you have any idea?

how to handle the multiple AngularJS under the one roof ?
Sandeep N S
@sandeep29_gitlab
How to automate gmail mails
olivvv
@olivvv_twitter
Hi
I would like to play with protractor plugins
but it does not seems to understand typescript in the plugin code
I added this in my tsconfig.json
"include": [
".e2e/test-plugin.ts"
but to no effect same error
Sandeep N S
@sandeep29_gitlab
How to automate gmail 2 way authentication?
LemonAndroid
@LemonAndroid
try xdotool or apple script/cliclick
ovartem
@ovartem
Gėorges
@gmoussayan

Hey in here. I have written the below in a separate .js file (to get today's and next month date...)

    var current = new Date();
    var dd = String(current.getDate()).padStart(2,'0');
    var mm = String(current.getMonth() + 1).padStart(2,'0');
    var yyyy = current.getFullYear();

    if (mm == 12){
        var nextAfterCurrent = new Date(current.getFullYear() + 1, 0, 1);
        var nextDD = String(nextAfterCurrent.getDate()).padStart(2,'0');
        var nextMM = String(nextAfterCurrent.getMonth() + 1).padStart(2,'0');
        var nextYYYY = nextAfterCurrent.getFullYear();
    }
    else{
        var nextAfterCurrent = new Date(current.getFullYear(), current.getMonth() + 1, 1);
        var nextDD = String(nextAfterCurrent.getDate()).padStart(2,'0');
        var nextMM = String(nextAfterCurrent.getMonth() + 1).padStart(2,'0');
        var nextYYYY = nextAfterCurrent.getFullYear();
    };    

    var today = dd + '/' + mm + '/' + yyyy;
    var nextToday = nextDD + '/' + nextMM + '/' + nextYYYY;

Im wondering how can i call today and nextToday variables on the spec.js file? (I am using POM design pattern)

Gėorges
@gmoussayan

Hey in here. I have written the below in a separate .js file (to get today's and next month date...)

    var current = new Date();
    var dd = String(current.getDate()).padStart(2,'0');
    var mm = String(current.getMonth() + 1).padStart(2,'0');
    var yyyy = current.getFullYear();

    if (mm == 12){
        var nextAfterCurrent = new Date(current.getFullYear() + 1, 0, 1);
        var nextDD = String(nextAfterCurrent.getDate()).padStart(2,'0');
        var nextMM = String(nextAfterCurrent.getMonth() + 1).padStart(2,'0');
        var nextYYYY = nextAfterCurrent.getFullYear();
    }
    else{
        var nextAfterCurrent = new Date(current.getFullYear(), current.getMonth() + 1, 1);
        var nextDD = String(nextAfterCurrent.getDate()).padStart(2,'0');
        var nextMM = String(nextAfterCurrent.getMonth() + 1).padStart(2,'0');
        var nextYYYY = nextAfterCurrent.getFullYear();
    };    

    var today = dd + '/' + mm + '/' + yyyy;
    var nextToday = nextDD + '/' + nextMM + '/' + nextYYYY;

Im wondering how can i call today and nextToday variables on the spec.js file? (I am using POM design pattern)

So with the help of @ArtemRudenko, I managed to export the .js file and use it on the spec file. I separated above code into 2 functions (getNext and getToday) and i exported each function using
exports.getNext = getNext;
exports.getToday = getToday;

and from the spec.js file, i imported the .js file same as i import the page objects; via:
var currentAndNextDate = require('../utils/current_and_next_date.js');

Thanks Artem :)

ramaaneel
@ramaaneel
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
image.png
My step definition file
image.png
My result terminal. My requirement is it to execute all blocks whether if it pass or fail
TIA
Thomas
@selenium4466_gitlab
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
Priyaa15
@Priyaa15
image.png
image.png
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?
image.png
Priyaa15
@Priyaa15
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?
image.png
Gėorges
@gmoussayan
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...)
Priyaa15
@Priyaa15
@gmoussayan thanks a lot, will try it out
ArtemRudenko
@artemrudenko
Gėorges
@gmoussayan

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...

Priyaa15
@Priyaa15
@gmoussayan thanks, I will play around the window sizes that works. I was trying on vsts ci
Gėorges
@gmoussayan
This might help too: elgalu/docker-selenium#20
ninogomez
@ninogomez
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!
Gėorges
@gmoussayan

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?))

ninogomez
@ninogomez
@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.
Gėorges
@gmoussayan
Yep, it will be unique, thanks @ninogomez
Ahmed Elshaikh
@elshaikh2_twitter
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
![alt]https://1drv.ms/u/s!AqB-Fj4rjhcpv03pr484fpVIFRNZ
[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)
Gėorges
@gmoussayan
Hello guys! any recommended good protractor tutorial?
ArtemRudenko
@artemrudenko
@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
Gėorges
@gmoussayan
I see. Thanks for the info @artemrudenko
ArtemRudenko
@artemrudenko
@gmoussayan you are welcome