Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to write a test case for dropdown selection change in angular 9

selectEl = fixture.debugElement.query(By.css('#dropdown'));
selectEl.nativeElement.options[3].nativeElement.dispatchEvent(new Event('click'));
selectEl.queryAll(By.css('option'))[3].nativeElement.click();
selectEl.nativeElement.options[3].nativeElement.click();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #write #test #case #dropdown #selection #change #angular
ADD COMMENT
Topic
Name
3+3 =