by

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
sancharee
@sancharee
Hi All, is there any way to pass elementFinder objects(or object locators) as parameters in function
1 reply
Jonathan Johnson
@jonathan-fw
can you match element using regex? something like by.model('.*value$') ?
praveenngp15
@praveenngp15
how to store the browser name in a variable without using async and await.
function getBrowserName(){
return browser.getCapabilities().then(function(txt){
return txt.get('browserName')
})
} -> Able to get browser name. But when assigning to a variable it is returning promise. How to resolve promise without using async and await
Rahul sharma
@Rahulsh76144034_twitter
Hi All, Is there a way to update cucumber.json report after or during execution? I want to add some meaningful text along with the error message for failed steps.
6 replies
protgitter
@protgitter
Hi All, Which version of Protractor should i be using for Angular 7 and above application? I am planning to use node 11.15 , Protractor 5.4.4 . We already have a huge test suite written using Protractor 5.3.2. We are migrating the app from angularjs to angular7 and above. We want to migrate to async await also during this migration phase.Can someone please share the version if you are already using and working for you? This would be very helpful. Thank You in advance
1 reply
RashmiKalpeshChauhan
@RashmiKalpeshChauhan
Hi Everyone

I am using Allure reports for reporting purpose in Protractor. when I am launching report , it is showing loading in the browser.

using below in conf file for generating reports-
onPrepare: function () {
var AllureReporter = require('jasmine-allure-reporter');
jasmine.getEnv().addReporter(new AllureReporter({
resultsDir: 'allure-results'
}));

image.png
is there anyone who faced this issue earlier or I am the first :)
Sandeep1217
@Sandeep1217
@RashmiKalpeshChauhan even I have faced. Sometimes it shows partial data. Still not yet got clear idea about that
RashmiKalpeshChauhan
@RashmiKalpeshChauhan
@Sandeep1217 -How did you fix that , due to that I am not able to see report.
Sandeep1217
@Sandeep1217
@RashmiKalpeshChauhan Not fixed, still doing r&d on that. It worked fine with wdio for me
nunofreitasbotelho
@nunofreitasbotelho

Shoud i do this:

expect(await page.getCurrentUrl()).toEqual('http://localhost:4200/page');

or this:

await expect(page.getCurrentUrl()).toEqual('http://localhost:4200/page');
Basically, all my page object requests should be async?
i'm getting a test (not the one from the example) that sometimes fails, when i'm only comparing string after typing on a table.
3 replies
Sergey
@romankovsv
Hi everyone, have somebody faced the issue with jasmine allure, when tests inreport are shown as unknown ?
1 reply
mohangit123
@mohangit123

Hi Everyone,
I am new to the protractor with cucumber BBD,I need to write a protractor script for reading table data from UI and also I need to write an expect for validating table data.
Please help.

Thanks in advance!!

RashmiKalpeshChauhan
@RashmiKalpeshChauhan
Sergey @romankovsv - Is your Allure Report issue resolved?
Juan Cañete
@astorcanch_gitlab
Hello Everyone, I upgraded recently to Protractor@7.0.0 and I realize that FocusDescribe and FocusIt are not working anymore, does someone experience something silimar?
Other coworkers that still have 5.4.3 are using it without issues
Juan Cañete
@astorcanch_gitlab
Hey it's working, it was a mistake, for some reason my test file was named as test_name.js.js haha. Classic layer 8 error xD
David Tran
@iso13
Looking for a solution with uploading a file for a react front end. Here is what I have attempted. Stuck in passing the file path with the system window, which will take you to the upload button.
const fileToUpload = "./testData/docs/test_1.docx";
const absolutePath = path.resolve( fileToUpload );
element.all(by.id('documents_header_uploadButton')).then(function(items) {items[0].sendKeys(absolutePath)});
rashmiambedkar
@rashmiambedkar
Whether latest version of protractor can test angular 9 or 10 web application??
saikrish06
@saikrish06
Im trying to naviagte from one window to another using protracto

I'm trying to navigate from one window to another using protractor and it is not happening.
This is the below snippet I'm using. Need help in getting this working.

this.switchtoNewWindow = function () {

    browser.ignoreSynchronization = true;
    firstActiveSurveyInGridAfterFilter.click().then(function () {
        basePage.waitAWhile(30000);
        browser.getWindowHandle().then(function (firstGUID) {
            browser.sleep(4000);
            browser.getAllWindowHandles().then(function (getallGUID) {
                console.log("The title of the current Page is : " + browser.getTitle());
                console.log("Total number of open Windows : " + getallGUID.length);
                for (var myguid of getallGUID) {
                    if (myguid !== firstGUID) {
                        browser.switchTo().window(myguid);
                        break;
                    }
                }
                var surveyName = element(by.xpath("(//div//h2)"));
                expect(surveyName.getText()).toEqual('Tax Survey Feb2020');
                browser.sleep(5000).then(function () {
                    console.log(" Title after switching to new window : " + browser.getTitle());
                });
                browser.switchTo().window(getallGUID[0]);
                browser.sleep(5000).then(function () {
                    console.log("Page title after switching back to main window: " + browser.getTitle());
                });
            });
        });
    });
};
Aasim Anwar
@aasimali

@cnishina
Hi, I am trying to get the network response using protractor but when I pass this setting in conf.js file, it is giving me an error:

capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'perfLoggingPrefs': {
'enableNetwork': true,
'enablePage': false,
'enableTimeline': false
}
},
loggingPrefs: {
performance: 'ALL',
browser: 'ALL'
}
},

error:
[18: 53: 54] E / launcher - WebDriverError: invalid argument: cannot parse capability: chromeOptions
from invalid argument: cannot parse perfLoggingPrefs
from invalid argument: unrecognized performance logging option: enableTimeline
(Driver info: chromedriver = 83.0.4103.14(be04594a2b8411758b860104bc0a1033417178be - refs / branch - heads / 4103@{ #119 }), platform = Windows NT 10.0.18362 x86_64)

Can you please help me ?

Luke
@luker2
@astorcanch_gitlab apologies, just now saw your response. We also do some similar strategies to make locators more generic depending on the scenario. Off topic, but I think your approach can be simplified a bit - you shouldn't have to set your private variable each time.
import { by, element, ElementFinder } from 'protractor';
import { BasePage } from './common/basePage';

class MyLibraryPage extends BasePage {

    async createNewLessonFromSlide (creationOption: string) {
        this.click(await element(by.xpath(`//p[contains(text(), ${creationOption})]`)));
    }
}
export const myLibraryPage = new MyLibraryPage();
1 reply
Luke
@luker2
Beyond that, I was seeking more of a try/catch approach to locating elements, and one where protractor would perhaps need to be aware or keep a history of which element was found "last" time (so this likely extends protractor's base functionality). But these other "AI" frameworks seem to keep a history of the properties of each element from previous runs, then use that information to find the element in subsequent test runs, even if developers have since made minor changes to the html.
Luke
@luker2
So for example, you have a test which runs fine for 2 weeks, then a developer changes a button name from Open Invoice to Show Invoice. So with the approach you & I currently use to locate elements - the test would instantly fail. But maybe that same button had a class name called invoice-button which DIDN'T change. The new approach I'm suggesting would recognize the same button still exists (by searching it's alternative properties - classname, attributes, etc). So it would click the button, save those new properties for later, then continue passing the test, with no extra work needed by the automation tester.
6 replies
Shalnev Andrew
@AndrewQA777
Hi! I'm trying to figure out how should waitForAngularEnabled() behave by design - should it keep given value (true or false) until it was explicitly changed or should it be true when any new page is loaded? It's not mentioned in documentation (https://www.protractortest.org/#/api?view=ProtractorBrowser.prototype.waitForAngularEnabled), but after updating to Protractor 5.4 I have to reset value to false from time to time during test execution. Thanks for any information about that!
3 replies
Monu Goswami
@monu1goswami
Can anyone please let me know how we can encrypt and decrypt the password in Protractor-javascript-cucumber framework
Also could anyone please let me know how to write the script for multiple test user with same user id and password and Multiple user with differet password set
Aasim Anwar
@aasimali
@AndrewQA777
As per my understanding you need not to define the waitForAngularEnabled() if you're dealing with the Angular Application, and if you're dealing with non-angular application then define like this: browser.waitForAngularEnabled(false);
abubakarafzal
@abubakarafzal
Whats new in ptotractor 7?
2 replies
immaheshdindigala
@immaheshdindigala
[8672:11116:0727/164311.438:ERROR:device_event_log_impl.cc(208)] [16:43:11.438] Bluetooth: bluetooth_adapter_winrt.cc:1074 Getting Default Adapter failed.
i am getting above error while executing protractor with typescript tests, could you please help me on this
3 replies
philicia
@tirzahtoh_twitter
Hi, Hi I am using cucumber with serenityJS/protractor framework and trying to integrate into the angular8's e2e folder, however when I run my test, it could not find the step defintions file: the error I got is: test:execute] > protractor e2e/protractor.conf.js [test:execute] [test:execute] [11:50:03] W/configParser - pattern e2e/src/features/*.feature did not match any files. [test:execute] [11:50:03] E/launcher - Spec patterns did not match any files. [test:execute] [11:50:03] E/launcher - Error: Spec patterns did not match any files. [test:execute] at Runner.run (/Users/xxxx/cognitive-studio-ui/node_modules/protractor/built/runner.js:322:19)
1 reply
Juan Cañete
@astorcanch_gitlab
Hello everyone, anyone with experience using protractor-image-comparison? Something tricky is happening to me.
8 replies
Christian Dellarosa
@ChristianDellarosa_gitlab
image.png
Hi, when executing my test cases protractor fails and indicates the tracking error, someone help me?
Konstantin Bläsi
@konstantinblaesi
@ChristianDellarosa_gitlab add a handler for https://nodejs.org/api/process.html#process_event_unhandledrejection
make the handle log the trace of the error, then fix the error using that info
unhandled rejection means your code contains async functions and you forgot to handle some errors (here promise rejection)
something like process.on("unhandledRejection", error => console.error("Unhandled rejected promise:", error))
Christian Dellarosa
@ChristianDellarosa_gitlab
Thank you!!, Where is that controller added? in the config.js?
Konstantin Bläsi
@konstantinblaesi
@ChristianDellarosa_gitlab yes that's a good place, add it as early as possible
chun
@c33wang
hi all, anyone know how to take screenshot using "protractor-image-comparison" right when tooltips pops up after hovering mouse over the canvas ? I'm having issue taking screenshot with the tooltips. I tried mouseMove, but protractor-image-comparison was not able able to capture the cavnas element with the tooltips showing
jedwantstocode
@jedwantstocode
has anyone encountered this issue running protractor in jenkins.. so after 6 specs, I always get this error: unknown error: session deleted because of page crash
Juan Cañete
@astorcanch_gitlab
how much ram do you have dedicated? Sometimes chrome crash because of lack of ram, I solved in the past by passing --disable-gpu argument. Those are my configs:
static serverChromeArgs = [
    '--no-sandbox',
    '--disable-dev-shm-usage',
    '--disable-gpu',
    '--lang=en-EN',
    '--window-size=1550,768',
    '--headless',
    '--enable-logging=stderr --v=1',
];