Locator not able to find element in Protractor Angular test

I am running an automation test using Protrcator on an angular app..but I am getting the following error when I run the javascript.
I am not able to catch the locator of this element..giving undefined error.
Any pointers/help is appreciated.

The error below is running the automation script is


after chkWorkscopeNumInEngineDataPage Workscope 35749
    And I should get a new workscope number
true
Setting the new workscopenumber 35749
    And I save the workscope number for Internal Review from Engine Data page
before chkWorkscopeOperatorCode
Engine Operator: undefined
    And The title should be prefilled with Operator code
    And wait for "5000" milliseconds
    And I select the current shop "Customer Hanger Shop"
    And I enter induction_date "5" days later to current date
    And I enter induction_date 5 days later to current date
    And I look for the toast "Saved"
after scenario
Attached

Failures:

1) Scenario: 4cof15:Add shop and induction date, save workscope for later use - Test_ModulesWorkscopeFeaturesWorkscopeSearch.feature:67
   Step: And The title should be prefilled with Operator code - Test_ModulesWorkscopeFeaturesWorkscopeSearch.feature:72
   Step Definition: Test_ModulesWorkscopestep_definitionsWorkscopeSearch_Steps.js:493
   Message:
     NoSuchElementError: Index out of bound. Trying to access element at index: 0, but there are only 0 elements that match locator By(css selector, .div[class="engine-margins"].label[class="engine-label-css"])
         at WebDriverError (C:Users2622018dmro-workspaceWorkscope-E2E-Automationnode_modulesselenium-webdrivererror.js:27:5)
         at NoSuchElementError (C:Users2622018dmro-workspaceWorkscope-E2E-Automationnode_modulesselenium-webdrivererror.js:230:5)
         at C:Users2622018dmro-workspaceWorkscope-E2E-Automationnode_modulesprotractorbuiltelement.js:248:27
         at Promise.invokeCallback_ (C:Users2622018dmro-workspaceWorkscope-E2E-Automationnode_modulesselenium-webdriverlibpromise.js:1329:14)
         at TaskQueue.execute_ (C:Users2622018dmro-workspaceWorkscope-E2E-Automationnode_modulesselenium-webdriverlibpromise.js:2790:14)
         at TaskQueue.executeNext_ (C:Users2622018dmro-workspaceWorkscope-E2E-Automationnode_modulesselenium-webdriverlibpromise.js:2773:21)
         at asyncRun (C:Users2622018dmro-workspaceWorkscope-E2E-Automationnode_modulesselenium-webdriverlibpromise.js:2652:27)
         at C:Users2622018dmro-workspaceWorkscope-E2E-Automationnode_modulesselenium-webdriverlibpromise.js:639:7
         at process._tickCallback (internal/process/next_tick.js:109:7)
     Error
         at ElementArrayFinder.applyAction_ (C:Users2622018dmro-workspaceWorkscope-E2E-Automationnode_modulesprotractorbuiltelement.js:371:27)
         at ElementArrayFinder._this.(anonymous function) [as getText] (C:Users2622018dmro-workspaceWorkscope-E2E-Automationnode_modulesprotractorbuiltelement.js:83:30)
         at ElementFinder._this.(anonymous function) [as getText] (C:Users2622018dmro-workspaceWorkscope-E2E-Automationnode_modulesprotractorbuiltelement.js:685:22)
         at World.<anonymous> (C:Users2622018dmro-workspaceWorkscope-E2E-AutomationTest_ModulesWorkscopestep_definitionsWorkscopeSearch_Steps.js:497:51)
         at _combinedTickCallback (internal/process/next_tick.js:73:7)
         at process._tickCallback (internal/process/next_tick.js:104:9)

6 scenarios (1 failed, 5 passed)
49 steps (1 failed, 5 skipped, 43 passed)
1m40.810s
[23:36:13] I/launcher - 0 instance(s) of WebDriver still running

Below is the script which is running behind

  this.Given(/^The title should be prefilled with Operator code$/, function (callback) {
    console.log("before chkWorkscopeOperatorCode");
    var engOperator = element.all(by.className('div[class="engine-margins"] label[class="engine-label-css"]')).first();
    console.log("Engine Operator: " + engOperator.getText());
    workscopeUtil.elementPresentUsingTestHelperPo(engOperator).then(function () {
        operatorFamily = engOperator.getText();
        workscopeSearchPage.chkTitleSummaryPage().getAttribute("value").then(function (getTitle) {
            console.log("after chkWorkscopeOperatorCode ","family",operatorFamily," title", getTitle);
            expect(getTitle).to.contain(operatorFamily);
            callback();
          });
      });
  });

The element in UI is:

enter image description here

Source: Angular Questions