not able to fill details inside a form whose attributes are dynamically changing
not able to fill details inside a form whose attributes are dynamically changing.
As per my knowledge, it is an iFrame and inside it is the required <input> Tag and all values are dynamically changing. I am confused and need help in filling this form.
Please help me. Thanks all in advance in helping me.
Well, I Faced the same problem in my Test Page then what I did is. I clean my cache and everything, and load the Test Page, What Ever The Attribute and selecting values you get with respect to element Use it.
for every Fresh load of the Page the Dynamic element have some element which does not changes.
Dear.. There must be some element which does no changes while each time Test Page load, use there element.
if all of the above plans failed then Try Xpath with start-with values, it will definitely help you.
That is an Iframe so I am assuming that you have already used
driver.switchTo().Frame() command. Once you are there on the frame use any of the CSS path or Xpath to locate the element. I am seeing that your element has a class attribute and it seems to be constant value. Try driver.FindElementByClass() to find this element, it should do.
So to summarize
– First switch to the frame by using driver,SwitchTo().Frame command
– Find the element using CSS or Xpath or class attribute
Once you are done do let us know if everything worked fine.
Yes have tried with iFrame also and the the elements inside it. All seems to be dynamically changing its value. I can only traverse to elements after switching to iframe which iam not able to do cause, its changing its value every time on load.
Other thing, i noticed that i was able to locate the elements correctly (cross verify it by Selenium IDE). So, without switching, cant use traversing to element. Please help me with the code if there is something specific i can try.