I'm a beginner in automation testing. I'm trying to select a value from data list and I got an XPath like mentioned below:
XPath : html/body/div[2]/div[1]/div/div[1]
This is the HTML for the same :
<input id="portfolioName" class="form-control ng-valid ng-dirty ng-valid-parse ng-touched" ng-model="vm.portfolioName"
name="portfolioName[]" autocomplete="off"
list="portfolioNameList" ng-change="vm.onPortfolioNameChange()" onclick="this.value='';"
style="" type="text"/>
When I execute the test case, it displays No such element found
exception
How do I resolve this problem? I'm using Selenium and protractor.
right click on element -> copy -> copy xpath