Team,
Is there any good online references to learn on writing xpaths? like writing generic paths instead of hard coding using ids
Ex: below is generic xpath searching for text with different patterns
/*[contains(text(),'ABC:')]/following::input[@type='text'][1] | //*[contains(text(),'ABC:')]/descendant::input[@type='text'][1] | //*[contains(text(),'ABC?')]/following::input[@type='text'][1] | //*[contains(text(),'ABC?')]/descendant::input[@type='text'][1] | //*[normalize-space(text())='ABC']/following::input[@type='text'][1] | //*[normalize-space(text())='ABC']/descendant::input[@type='text'][1] | //form/descendant::input[@type='text' and not( //*[contains(text(),'ABC:')]/following::input[@type='text'][1] | //*[contains(text(),'ABC:')]/descendant::input[@type='text'][1] |
thanks,