I have searched several questions but I didn't figure out my problem:
I want to test/verify configuration pages of 2 systems. But I faced 3 challenges:
1.The pages for 2 systems look same at all, but actually the dom/xPath info of same items(text,drop-down list, radio button and so on) are totally different. For example, the "Device Name" fields of 2 systems on the page have 2 different xPath, such as xPath of sys1 is "//input/abc" and xPath of sys2 is "//input/xyz".
2.Sometimes the page is generated dynamically so the dom/xPath of the same item of one system may be different at different time.
3.Based on 1 & 2, it's difficult of me to write one script to run on all systems(we'll have more system in the future). I don't want to define different xpath/dom database for different systems.
My question is:
1.Can selenium return how many “text field" "drop-down list" "radio button" objects on the page?
2.Can selenium return xPath/dom of each objects in Question1?
I hope selenium can return all objects and xPath/dom info of each object, so that I can make a mapping and call for different systems(I can decide which xPath is currently using by comparing the Index/Location of "same" objects).
Appreciate for all comments/help.