Unable to identify extjs date field with partial ID

Hi Team,

I’m working on a application in ext js  which is very dynamic in nature. I’m using selenium Webdriver , I could able to locate text fields , combo boxes in the page using the Partial ID(Contains ,Startwith etc…) , but unable to locate the Date field in the same page (Note: Only one date field exist in the page.). Please  help me to identify this date field object


I could able to access the combo box using the below code

WebElement comb = driver.findElement(By.xpath(“//input[contains(@id, ‘combo’)]”));

Tried with the below and unable to locate the datefield

WebElement dateBox = driver.findElement(By.xpath(“//input[contains(@id, ‘datefield’)]”));

Element Details

<input id=”datefield-1217-inputEl” data-ref=”inputEl” type=”text” role=”textbox” size=”1″ name=”dateOfBirth” maxlength=”10″ class=”x-form-field x-form-required-field x-form-text x-form-text-default x-form-invalid-field x-form-invalid-field-default” autocomplete=”off” componentid=”datefield-1217″>


Default Asked on July 31, 2018 in Selenium WebDriver.
Add Comment
  • 1 Answer(s)

    it seems name attribute is not changing can you use name attribute for the webelement.

    Train Answered on August 7, 2018.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.