title: How to choose unique element in two same model?
body: <p>I am trying to select unique element but the problem is there is 2 model with no unique mode, and id is dynamic.
  <a href="https://i.stack.imgur.com/QM6g2.png" rel="nofollow noreferrer">its the html</a>
  test spec</p>
  
  <pre><code>it('Rental Car should work ', function() {
  
  let rentalCar = new Hotel();
  rentalCar.operator.sendKeys('Eurocar');
  rentalCar.carClass.selectValue('M');
  rentalCar.pickupTime.sendKeys('12');
  rentalCar.DropOfTime.sendKeys('13');
  //rentalCar.cancelable.check();
  rentalCar.clientAmount.sendKeys('120');
  rentalCar.supplierAmount.sendKeys('12');
  rentalCar.pickupLocation.sendKeys('berlin');
  rentalCar.selectpickOption.click();
  browser.sleep(2000);
  rentalCar.dropLocation.sendKeys('Han');
  browser.sleep(2000);
  rentalCar.selectDropOption.click();
  browser.sleep(2000);
  rentalCar.save();
  </code></pre>
  
  <p>})</p>
  
  <p>i tried to add first() and last() at the end of page object but its getting error "TypeError: $(...).first is not a function "</p>
  
  <pre><code>class Hotel {
  </code></pre>
  
  <p>constructor() {</p>
  
  <pre><code>this.operator = element(by.model('$ctrl.item.operator'));
  this.carClass = new MdSelect('$ctrl.item.class');
  this.pickupTime = element(by.model('$ctrl.item.pickup_time'));
  this.DropOfTime = element(by.model('$ctrl.item.return_time'));
  //this.cancelable = new MdCheckBox('$ctrl.item.isFlex');
  this.clientAmount = element(by.model('$ctrl.item.traveler_item_data[0].line_items[0].gross_amount'));
  this.supplierAmount =element(by.model('$ctrl.lineItem.supplier_gross_amount'));
  this.pickupLocation = $('md-autocomplete md-autocomplete-wrap md-input-container [aria-label="Pickup location"]');
  this.selectpickOption = $('md-virtual-repeat-container md-autocomplete-parent-scope');
  this.dropLocation = $('md-autocomplete md-autocomplete-wrap md-input-container [aria-label="Drop-off location"]');
  this.selectDropOption = $$('.md-virtual-repeat-container .md-autocomplete-parent-scope '); }
  </code></pre>
  
  <p>help me to solve this problem.</p>