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.

IMLearnernot 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

IMLearner Default Asked on January 26, 2016 in Selenium WebDriver.

Did you put wait for this popup..?
i guess you might be having  wait issue.

on January 27, 2016.
Add Comment
5 Answer(s)

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.
OR
Dear.. There must be some element which does no changes while each time Test Page load, use there element.
OR
if all of the above plans failed then Try Xpath with start-with values, it will definitely help you.

kajugul Train Answered on January 27, 2016.
Add Comment

Request you to please tell me the code i should use here. Thanks

IMLearner Default Answered on January 27, 2016.
Add Comment

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.

Virender

Virender Singh Professor Answered on January 27, 2016.
Add Comment

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.
Thanks

IMLearner Default Answered on January 27, 2016.
Add Comment

Put the relevant part of the code that you have written till now. We will help you out with the correct code by pointing out errors.

Virender Singh Professor Answered on January 28, 2016.
Add Comment

Your Answer

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