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
Wilgert Velinga
@wilgert
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
@mayankverma24
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
@thimmaraju418_twitter
Hi All ..how do i run autoit exe file is protractor script.
ArtemRudenko
@artemrudenko
@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');
Luke
@luker2
Any way to have protractor run the same .spec multiple times in parallel? I guess you could copy/paste the actual .spec file & have the glob pick up multiple file instances, but I'd rather not copy the file out a bunch of times
Sri Harsha
@harsha509
@lukeanderson you can use capability count:noOfInstances to achieve this.
Luke
@luker2
@Harsha509 yay! perfect!
Luke
@luker2
@Harsha509 @cnishina although I don't think jasmine is fully compatible with the count capability - like it can't tell the difference between the tests. count: 2 runs a test twice, and a jasmine reporter will output 2 specStarted's, but they have the same id :/ (so later if I wanted to associate the test's specDone or other jasmine output back to the same test, I couldn't)
{
    "id": "spec0",
    "description": "",
    "fullName": "",
    "failedExpectations": [],
    "passedExpectations": [],
    "pendingReason": ""
}, {
    "id": "spec0",
    "description": "",
    "fullName": "",
    "failedExpectations": [],
    "passedExpectations": [],
    "pendingReason": ""
}
Sri Harsha
@harsha509
@luker2 , mm very strange. But am able to get the details correctly checked just now. Here is the output from spec done

{"id":"spec0","description":"should add one and one","fullName":"Protractor Demo App should add one and one","failedExpectations":[],"passedExpectations":[{"matcherName":"toEqual","message":"Passed.","stack":"","passed":true}],"pendingReason":"","status":"passed"}

{"id":"spec1","description":"should add one and two","fullName":"Protractor Demo App should add one and two","failedExpectations":[],"passedExpectations":[{"matcherName":"toEqual","message":"Passed.","stack":"","passed":true}],"pendingReason":"","status":"passed"}
{"id":"spec2","description":"should add one and three","fullName":"Protractor Demo App should add one and three","failedExpectations":[],"passedExpectations":[{"matcherName":"toEqual","message":"Passed.","stack":"","passed":true}],"pendingReason":"","status":"passed"}
{"id":"spec3","description":"should add one and Four","fullName":"Protractor Demo App should add one and Four","failedExpectations":[],"passedExpectations":[{"matcherName":"toEqual","message":"Passed.","stack":"","passed":true}],"pendingReason":"","status":"passed"}
{"id":"spec4","description":"should add one and five","fullName":"Protractor Demo App should add one and five","failedExpectations":[],"passedExpectations":[{"matcherName":"toEqual","message":"Passed.","stack":"","passed":true}],"pendingReason":"","status":"passed"}

Luke
@luker2
@Harsha509 Is that with 1 spec/describe file and count: 5? Do you have multiple it() blocks per spec file?
Sri Harsha
@harsha509
My bad. Yes I have multiple it blocks, are you trying to do it with single it block ?
Luke
@luker2
Yep, 1 it block per describe.
Luke
@luker2
@Harsha509 This work-around may solve my issue. When running in parallel, since each describe/spec appears to be an individual node process - I can set a unique instance id as an environment variable, then reference it later in the jasmine reporter
// .spec.ts file
describe('example test', () => {

    process.env.instanceId = generateGuid();
    console.log('describe instanceId: ' + process.env.instanceId);

    it('run test steps', () => {
        // do stuff
    });
});

// jasmine reporter
export class CustomJasmineReporter implements CustomReporter {

    specStarted(data: any) {
        data.instanceId = process.env.instanceId;
        console.log(`specStarted: ${JSON.stringify(data)}`)
    }

    specDone(data: any) {
        data.instanceId = process.env.instanceId;
        console.log(`specStarted: ${JSON.stringify(data)}`)
    }
}
Sri Harsha
@harsha509
👍🏻
vnvbsudhakar
@vnvbsudhakar
Hi All,

Hi All, I am new to protractor - automation testing. I am following protractor website to do create few dummy tests.
Problem statement: i don't see line number when any test case fails
for eg:
D:\ProtractorDeltaPOC>protractor conf.js
[07:53:44] I/launcher - Running 1 instances of WebDriver
[07:53:44] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[07:53:51] I/launcher - 0 instance(s) of WebDriver still running
[07:53:51] I/launcher - chrome #01 failed 1 test(s)
[07:53:51] I/launcher - overall: 1 failed spec(s)
[07:53:51] E/launcher - Process exited with error code 1

in the above code, it says test is failed but there are no reference. Can someone help me.

Sri Harsha
@harsha509
Hi @vnvbsudhakar, Try to enable includeStackTrace:true in jasmineNodeOpts. And also can you please ping me your spec file, it should log the stack traces if the test fails basically !!!
vnvbsudhakar
@vnvbsudhakar
@Harsha509 : I shall try this and get back to you. By any chance do you know where can I do proxy settings
JJNULL
@JJNULL
@JJNULL
Good morning a question I want to make a configurator for word files and be able to export them, someone knows of some pluggin
in Angular
Sri Harsha
@harsha509

Hi @vnvbsudhakar , you can set proxy in capabilities like this

capabilities: {
'proxy': {
'proxyType': 'manual',
'httpProxy': 'hostname.com:1234'
}
}

If that does not work, try to set node proxy using npm like below
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
Hope this helps!
vnvbsudhakar
@vnvbsudhakar
okay
but how do we enter user name and password
Sri Harsha
@harsha509

@vnvbsudhakar , like this

npm config set https-proxy http://"username:password"@proxy.company.com:8080

vnvbsudhakar
@vnvbsudhakar
oh double quotes, I tried this but without double quotes
will try and update you
vnvbsudhakar
@vnvbsudhakar

my spec file is
describe("Launch browser", function(){
browser.get('http://freecrm.com/')
})

my conf file is
exports.config = {
framework: 'jasmine2',
// seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['tests/asyncFix.js'],
}

this is the log in terminal
[18:05:05] I/launcher - Running 1 instances of WebDriver
[18:05:05] I/local - Starting selenium standalone server...
[18:05:07] I/local - Selenium standalone server started at http://192.168.137.1:53801/wd/hub
Started

No specs found
Finished in 0.004 seconds

[18:05:11] I/local - Shutting down selenium standalone server.
[18:05:11] I/launcher - 0 instance(s) of WebDriver still running
[18:05:11] I/launcher - chrome #01 passed

Always I get No specs found and tests are not executing

Mayank Verma
@mayankverma24
@artemrudenko Thanks for the information!
Yogendra Porwal
@yogibaba2
hello /@all I have improvised an html reporter for protractor with jasmin, it also combined a console reporter.
please try once and let me know the feedback
note: its just an improvisation
https://www.npmjs.com/package/protractor-jasmine2-html-cli-reporter
Shatha-Alhamad
@Shatha-Alhamad
hi all , please any idea how to write protractor test for auto checking backend error logs and extracting the logs related to prod server ? thanks
jedwantstocode
@jedwantstocode
has anyone encountered running webdriver-manager start in jenkins and it hangs and does not continue with test
no error even after 5mins
Sri Harsha
@harsha509
Hi @jedwantstocode providing jenkins log might help us to debug the issue.
jedwantstocode
@jedwantstocode
good morning all. Currently, when I run my tests locally, the login credentials(username, password) is in a json file and it is gitIgnored so it wont be uploaded to the public repo. I wanted to run my tests in jenkins, is there a way to handle this where I dont have to upload the username and password to the app but enable login during my test?
@Harsha509 Hi sri, I updated my test to use the standalone server and commenting out the selenium address in my conf. it did run my test but just realized now that jenkins does not allow me to manage the app when its inside the iframe
Sri Harsha
@harsha509
okay, so if you dont want to upload your credential file. try to encrypt the credentials and decrypt when you want to use
Sri Harsha
@harsha509
This package might help you https://www.npmjs.com/package/encryptjs
Mayank Verma
@mayankverma24
Hi All, is there a way to access the cookies through xmlhttprequest method?
Sri Harsha
@harsha509
@mayankverma24 Have you tried => var cookie = XMLHttpRequest.getAllResponseHeaders(Set-Cookie);
or Set-Cookie2
Mayank Bhola
@psych0der
Hello there. I have submitted a PR here at angular/protractor#5260. I have tried signing CLA multiple times but still it shows no-cla. Can anybody help me here?
jbittmansb
@jbittmansb
Hi, I am struggling to find how to select elements in native app thru appium using accessibility id. the global.by object has no locator by accessibility id. Is this not supported thru protractor and I should use a different locator type?
jedwantstocode
@jedwantstocode
Hi @Harsha509 again! thank you. I will look into that and come back. Btw, our application uses the microsoft login service and then after successful login, it loads the application. I hope your link will help with that.