How to identify Extjs objects which are very dynamic

Hi I’m working on a application which is having object is very dynamic in nature. especially around the webtable, raido buttons and drop down. I’m using selenium IDE and Webdriver.
I tried Xpath too which end in same dynamic properties. Please do help me to identify these object and handle them.

sample code has been placed below where the properties are dynamic.

driver.get("app URL");

driver.findElement("AccountFile:AccountFileMenuActions-btnIconEl")).click(); driver.findElement("AccountFile:AccountFileMenuActions:AccountFileMenuActions_Create:AccountFileMenuActions_NewSubmission-textEl")).click();

driver.findElement("NewSubmission:NewSubmissionScreen:ProductSelection_GODV:AcquireClearances-btnInnerEl")).click();   driver.findElement("NewSubmission:NewSubmissionScreen:ProductSelection_GODV:5:SelectButton")).click();









Default Asked on October 27, 2014 in Software Testing.
  • 2 Answer(s)

    Hi Dilip

    I am not Sure Why Xpath is not Working for You , You Might be Using it in Wrong Way
    You Need to Use Xpath Without Attributes as You Said Properties are Dynamic

    RE: How to identify Extjs objects which are very dynamic

    Here in This Example we can Find Xpath of Text Filed in 2 Ways

    1. //Input[@id=’gbqfq’]  This is One Way to Calculate Xpath But This Will Not Work in Your Case as u Said Elements Are Dynamic
    I Would Suggest You to go With Second One

    2. div[1]/div[2]/div[1]/div[1]/div[3]/div/div/div/form/fieldset[2]/div/div/div/div/div[3]/div/input[1]
    This is Absolute Xpath , Try Locating Your Elements With Absolute Xpath , But This is not Suggested Way


    Vice Professor Answered on October 27, 2014.
    Add Comment

    Hi Dilip,

    Take a look at the below article and let me know if you still face any issue on choosing xpath:

    Lakshay Sharma

    Professor Answered on October 27, 2014.
    Add Comment
  • Your Answer

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