Category : selenium

I’m doing an E2E test on an Angular/C# application with Selenium. I want to fill in a angular material form with Selenium. There are 2 form-fields: date1 and date2 Date1 works fine: I clear the field and fill in the new date: public void Wait(IWebDriver _webDriver, string elementString) { WebDriverWait wait = new WebDriverWait(_webDriver, TimeSpan.FromSeconds(5)); ..

Read more

I have created a toggle button which holds webcomponent with text field and text area.I can hide this webcomponent and is working fine but when I tried to test it using robot testing and Page Should Contain Element locator = ${basePath}.querySelector("div[class=’classname’]"),Test is failing.Do I have any other alternatives other than "Page Should Contain Element" for ..

Read more

I have an angular app with enabled ViewEncapsulation.ShadowDom, inside which there is an iframe. When I’m trying to write protractor test I’m getting an error: Failed: unknown error: no element reference returned by script While I’m able to actually get web element, I can’t perform any actions with it. const root = element(by.css(‘app-root’)).getWebElement(); browser.driver .executeScript(‘return ..

Read more

When trying to run e2e tests in a new Angular application created today: Error: SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 90 chromedriver=90.0.4430.24 appears to be requiring Google Chrome V90. Unfortunately, this version of Google Chrome is still in beta. Anyone know any way to resolve this? Source: Angular..

Read more

I am trying to access the elements in the dropdown. Unlike other drop downs that have the options and values written in one place. Like this: <select> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> This dropdown has it’s elements or attributes referenced to another file. <div class="row"> <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4"> <div ..

Read more

I know there are several threads with this topic but none of the solutions i’ve found have worked for AngularJS v1.6 So here is what i’ve tried: public void waitForAngularRequestsToFinish() { while ((boolean) jsExec.executeScript( "return (typeof angular !== ‘undefined’)? true : false;")) { jsExec.executeAsyncScript( "var callback = arguments[arguments.length – 1];" + "angular.element(document.body).injector().get(‘$browser’).notifyWhenNoOutstandingRequests(callback);"); } } This ..

Read more

I am writing test automation for Ajenti2 With Selenium for Python I need to disable animation: progress bar, buttons, icons, etc I found it: $animate.enabled() here https://docs.angularjs.org/guide/animations But i can’t figure out how to apply it. This works in: https://plnkr.co/edit/ It doesn’t work in DevTools console, or by adding a script to the template: https://github.com/ajenti/ajenti/blob/master/plugins/core/content/pages/index.html ..

Read more