RE: 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(By.id("AccountFile:AccountFileMenuActions-btnIconEl")).click(); driver.findElement(By.id("AccountFile:AccountFileMenuActions:AccountFileMenuActions_Create:AccountFileMenuActions_NewSubmission-textEl")).click();

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

driver.findElement(By.id("ext-gen4718")).click();
driver.findElement(By.id("SubmissionWizard:Next-btnInnerEl")).click();

driver.findElement(By.id("SubmissionWizard:Next-btnInnerEl")).click();

driver.findElement(By.id("SubmissionWizard:Next-btnInnerEl")).click();

driver.findElement(By.id("SubmissionWizard:LOBWizardStepGroup:LineWizardStepSet:WC7StateCoverageScreen:WC7StateCoverageCV:WC7ClassesInputSet:WCCovEmpLV_tb:Add-btnInnerEl")).click();

driver.findElement(By.id("ext-gen5929")).click();

driver.findElement(By.id("ext-gen5972")).click();

driver.findElement(By.id("simplecombo-1553-inputEl")).click();

driver.findElement(By.id("ext-gen6021")).click();

Dilip Default Asked on October 27, 2014 in Software Testing.
2 Answers

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

Regards
Ankit

Vice Professor Answered on October 27, 2014.
Add Comment

Your Answer

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