Category : automated-tests

After updating chrome driver to ChromeDriver 91.0.4472.19 The value attribute have dissapeared from the input elements. Protractor cannot access the value attribute. let x = await xDiv.getEl("#xInput").getAttribute(‘value’); // x = null Using the Chrome Dev Tools, I am also not able to see the value attribute of any input element in the markup. Using AngularJS ..

Read more

Karma error messages: app.component.spec.ts file code: import { TestBed, async } from ‘@angular/core/testing’; import { AppComponent } from ‘./app.component’; import { RouterTestingModule } from ‘@angular/router/testing’ import { HttpClientModule } from ‘@angular/common/http’; describe(‘AppComponent’, () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule, HttpClientModule ], declarations: [ AppComponent ], }).compileComponents(); })); it(‘should create the app’, () ..

Read more

We have a scenario in our project – there is a text area in which if we click "ctrl + space", there is a list/dropdown which gets visible. Now I want to simulate this behaviour with my protractor test case. Please find the code below: await letterBody.sendKeys(lettertestdata.LetterTemplate.letterBodyText); // to enter "this is automated test text" ..

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’m new with angular and have some questions with testing. Below is part of the code on the homecompoonent.ts: ngOnInit(): void { this.mapService.mapLoaded$.subscribe( state => { this.loadingState = state; } ); if (!this.isMobile || this.selectedView === ‘map’) { this.mapService.canLoadMap$.next(true); } else { this.mapService.triggerMapLoadedTransition(); } this.filterService.canLoadFilter$.next(true); } I am trying to test the map service and ..

Read more