I have used the below code at which i am getting the error. I am running using java, selenium and testng framework.
WebElement stateSelect = driver.findElement(ByAngular.withRootSelector(""app-create-customers"").model("state"))
Please find the error in the below logs.
Issue Logs.txt;
I have chosen the right root selector and also the model.
My Html doc in angular app looks like so.
<div class="col-md-6">
<div class="form-group">
<label for="userinput4">State<span style="color:red">*</span></label>
<ng-select [(ngModel)]="state" (change)="onSelectState()">
<ng-option value="KARNATAKA">KARNATAKA</ng-option>
<ng-option value="TAMIL NADU">TAMIL NADU</ng-option>
<ng-option value="ANDHRA PRADESH">ANDHRA PRADESH</ng-option>
</ng-select>
</div>
</div>
On inspecting the web element the html code looks something like this, which seems that i have chosen the right root selector.
...
I have very little knowledge in angular and started automating a website for the first time in selenium.
I have used the below code at which i am getting the error. I am running using java, selenium and testng framework.
WebElement stateSelect = driver.findElement(ByAngular.withRootSelector(""app-create-customers"").model("state"))
Please find the error in the below logs.
Issue Logs.txt;
I have chosen the right root selector and also the model.
My Html doc in angular app looks like so.
On inspecting the web element the html code looks something like this, which seems that i have chosen the right root selector.
I have very little knowledge in angular and started automating a website for the first time in selenium.