Looking at a code snippet from a website, I aim to extract the 5th line which is located within the following code segment:
<input type="text" placeholder="Enter Workflow Name"
Here is the Code:
<div class="workflow-container ng-scope" data-ng-controller="sourceCode.Designer.uiComponents.conciergeScreen.templates.NewWorkflowController">
<div class="input">
<div class="wrapper top" data-ng-class="{'fill': hosted === true}">
<label class="welcome">What should your workflow be called?</label>
<input type="text" placeholder="Enter Workflow Name" class="workflow-name-textbox ng-valid ng-not-empty ng-touched ng-dirty ng-valid-parse" data-ng-class="{'error': errors.error}" autofocus="" data-ng-focus="select($event)" data-ng-model="conciergetitle" data-ng-model-options="{ updateOn: 'default blur', debounce: { default: 300, blur: 300 } }" data-ng-change="inputchange(designeritems)" data-ng-keyup="$event.keyCode == 13 && createnewstudioitem(designerItems[0], conciergetitle, $event)" style="">
<div class="errogory">
...
</div>
The intention is to interact with the textbox by clicking on it to clear its text value. A test script has been incorporated in an attempt to achieve this goal:
describe("New Screen", function () {
it("Should give textbox a new name", function () {
browser.sleep(10000);
console.log('Enter new name');
var editName = element.all(by.className('.workflow-name-textbox'));
editName.first().click().then(function () {
console.log('Clicked on Create');
})
browser.sleep(10000);
})
An error message persistently appears stating: Index out of bound. Trying to access element at index: 0 ...
If modifications are made to the script as shown below:
var editName = element.all(by.css('.workflow-name-textbox'));
editName.click().then(function () {
console.log('Clicked on Create');
Although no errors arise, there seems to be no action being triggered upon clicking.
Given that Protractor is functioning correctly based on previous navigations, any suggestions or recommendations to troubleshoot this issue would be greatly appreciated.