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
ArtemRudenko
@artemrudenko
could you please provide us with the error output
Ramakrishna Telapolu
@sriram474
Hi ArtemRudenko, i have resolved the issue that is due to the spellCheck error in conf.js given browser as browsername instead of browserName
it got resolved now
@artemrudenko, Do you have any idea on how to identify the element (input element) which is in the shadow DOM
7 replies
Dear Gitters, if any of you could helpme on how to identify or locate a element under the shadow DOM i would be grateful to you
Ramakrishna Telapolu
@sriram474
here is my DOM :
sorry i am not able to add the screenshot
@sriram474
Hi All
i need help on how to locate input element with certain name underlying the shadow root element in DOM
appreciate if any of you could help me on how to resolve it
shadow-root > div>div>div>input
Ramakrishna Telapolu
@sriram474
Hi @Xotabu4
@Xotabu4 hi
Puru-rs
@Puru-rs

Hi i am trying to run protractor using jenkins in linux box, when the job is executed it is giving an error
[21:58:12] I/direct - Using ChromeDriver directly...
[21:58:12] E/launcher - unknown error: cannot find Chrome binary
(Driver info: chromedriver=91.0.4472.19 (1bf021f248676a0b2ab3ee0561d83a59e424c23e-refs/branch-heads/4472@{#288}),platform=Linux 3.10.0-862.11.6.el7.x86_64 x86_64)
[21:58:12] E/launcher - WebDriverError: unknown error: cannot find Chrome binary

can any one solve this error?

3 replies
gezahorvath
@gezahorvath
Hi I get the old issue of EADDRINUSE , angular/protractor#4447 with Protractor 7.0.0.
I use chromedriver on windows 10 with directconnect set as true. I tried to raise the MaxUserPort and TIME_WAIT variables in windows but still get the issue. What can I do to get rid of it? Do you have some idea for a workaround?
cs2021
@cs2021:matrix.org
[m]
Hi, after upgrading angular to version 9.1, node to version 12.22.3 and typescript to 3.8.3(removed deprecations wrt typescript v4 as suggested), I am not able to run a feature file (using npm run e2e). Error is - 'Error: TSError: ⨯ Unable to compile TypeScript'. It gives this error for a particular file where it gives an error for 'Cannot find module 'xyz'', but that file does not have compilation error and works fine while serving the application. Currently using chrome version 90.0.4430.72. I am using protractor v5.4.2, protractor-cucumber-framework v6.1.1, protractor-http-client v1.0.4, selenium-webdriver v3.6.0, webdriver-manager v12.0.6. How can I get the feature files running?
Sri Harsha
@harsha509
Hi,
Will the protractor supports testing angular 12.x.x version?
Looks like am facing sync issues
StanislavKharchenko
@StanislavKharchenko
Hi, we are using Protractor with angular 12, works ok. What issues you have?
StanislavKharchenko
@StanislavKharchenko
@harsha509 regarding sync, check if all task are finished before interact with element. https://www.protractortest.org/#/timeouts
Sri Harsha
@harsha509
Timed out waiting for Protractor to synchronize with the page after 60 seconds. Even I tried browser.ignoreSynchronization = true;
And the problem is the team is using protractor 3.0.0
StanislavKharchenko
@StanislavKharchenko
@harsha509 try to await browser.waitForAngularEnabled(false) and check if issue still exists.
Sri Harsha
@harsha509
Sure, but looks like browser.waitForAngularEnabled(false) is introduced in 4.x.x versions so i need to update the protractor version, which project members doesn't want to do
StanislavKharchenko
@StanislavKharchenko
@harsha509 I suggest to use latest stable version of Protractor and also use async/await
Jan Molak
@jan-molak

Hi folks, I've just published protractor-cucumber-framework version 8.2.3 with Serenity/JS 2.30.1.

I've also deprecated protractor-cucumber-framework versions 0.x, since they were published 5-6 years ago, are no longer supported, and version 8.x is backwards compatible.
Please let me know if anyone has any questions regarding how to upgrade from 0.x to 8.x.

If you have any questions about Serenity/JS itself, please join our community chat here on Gitter.

Shalu
@shalu0628
Hi All, am a newbie here in protractor, can someone help with this 'read excel data in protractor' --- requirement is to store locators and data in excel sheet, and the test script should read the data and run the UI test cases.
Shalu
@shalu0628
It gets executed but the browser gets closed immediately.. I cannot see if the data from excel is getting executed or not.. in other words browser.sleep(500000) is not working.. browser gets closed immediately.. please help
StanislavKharchenko
@StanislavKharchenko
@shalu0628 do you use async/await for any browser actions?
Shalu
@shalu0628

@StanislavKharchenko -- this is my code -- "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
import { browser, element, by, By, $, $$, ExpectedConditions, ElementFinder, ProtractorBrowser } from 'protractor'
import { Workbook } from 'exceljs'
var protractor = require("protractor");

describe('Read from excel', async function () {

it('open and read excel data',async function () {


    var wb = new Workbook();
    wb.xlsx.readFile("C:\\Users\\Lenovo\\test-ui\\outputjs\\exceldata\\TestData.xlsx").then(async function () {

        var sheet = wb.getWorksheet("Protractor_Test_Data");
        var numberofRows = sheet.rowCount;
        var numberofCols = sheet.columnCount;

        const addresselem = sheet.getRow(2).getCell(1).toString();
        const addressdata = sheet.getRow(2).getCell(2).toString();
        const getquotebtn = sheet.getRow(2).getCell(3).toString();
        console.log(addresselem);
        console.log(addressdata);
        console.log(getquotebtn);


        browser.get("http://x.xxx.xxx.xx/home/#/Homepage");
        await browser.sleep(10000)

        browser.element(by.xpath(addresselem)).sendKeys(addressdata); 
        await browser.sleep(5000);
        await browser.element(by.className(getquotebtn)).click();
        await browser.sleep(5000);      

    })
})

})

I have used async functions and await in browser.sleep
the broser gets closed in 0.109 seconds or so
please help
it successfully fetches code from excel and prints on the console.. but after that the URL is launched and gets closed too quickly.. and I cannot see if the data is being sent to the textbox or not
StanislavKharchenko
@StanislavKharchenko
use "await" keyword before any action with browser. So, in your example, you need to set "await" before: browser.get, browser.element
Shalu
@shalu0628
@StanislavKharchenko - thank you so much for responding! I tried, adding await before browser.get actions but the same thing happens.. I cannot see the browser - and data being entered in the textbox at all.. kindly advice..
the above is in protractor jtypescript asmine framework
StanislavKharchenko
@StanislavKharchenko
@shalu0628 Did you tried to run test in debug mode, set breakpoint in browser get and observe what happened?
Shalu
@shalu0628
okay, I will try @StanislavKharchenko
Jan Molak
@jan-molak

Hey folks, I've just published a new chapter of "Thinking in Serenity/JS", where you'll learn how to build a full-stack acceptance testing framework from scratch with Serenity/JS

Check it out and let me know what you think!

"Thinking in Serenity/JS"

Shalu
@shalu0628
browser.executeScript('window.scrollTo(0,2000000);').then(function () {
chkboxprevdecpg.click();
}) ----> Hi all, am trying to scroll down using this code and the scroll is not working.. can someone please guide?
StanislavKharchenko
@StanislavKharchenko
@shalu0628 await browser.executeScript('arguments[0].scrollIntoView()', element.getWebElement()); where element - is Protractor ElementFinder. So you will be navigated into element located at page
Shalu
@shalu0628
Shalu
@shalu0628
Hi All, I am trying to upload a file from my system -- here is the code that I referred from StackOverflow --- but it doesn't send the path in the FilePath -- can someone please help? --- var uploadInput = element(By.css("input[type=file]"));
uploadInput.sendKeys("C:\UploadFileTest-UI\sample.txt");
The window is opened.. but the sendKeys is not getting executed.. can someone please help?
StanislavKharchenko
@StanislavKharchenko
@shalu0628 you need just to interact with locator available in dom tree. What do you mean "the window is opened" ?
Shalu
@shalu0628
@StanislavKharchenko - the file window to choose the file is opened.. but it doesn't enter the path .. actually, I cannot get the locator as its outside of my browser..
StanislavKharchenko
@StanislavKharchenko
@shalu0628 You don't need to open "upload dialog". This dialog is a part of windows application, and not controlled by browser. You need to just sendKeys a path to file into input element in the dom tree.
Example:
import remote = require('selenium-webdriver/remote');
browser.driver.setFileDetector(new remote.FileDetector());
await browser.element(by.css('input[type="file"]')).sendKeys(filePath.join('\n'));
Shalu
@shalu0628
okay, thank you @StanislavKharchenko
Shalu
@shalu0628
Hi All, the front developers are using a custom created tag by some means.. how do I get the handle to such a tag in protractor?
spmiller
@spmiller
@shalu0628 we use custom tags with Angular all the time and it protractor handles it fine?
Shalu
@shalu0628
image.png
@spmiller -- can you please help me -- as I am not able to get the handle to this tag as in the HTML code below ---