Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Watin to test a website. It contains a div which is created dynamically on clicking a tablecell. How can I access the dynamically created div. The issue is the div is deleted after a short span of time (even before the control can move to next line)

tablecell.ClickNoWait(); //this creates the dynamic <div>
if(div.exists) //the control does not go inside 
//code to edit div contents.
share|improve this question
Could you update your post with the HTML/JavaScript referencing the div? The way you access it will depend on how the div is coded. – Kate Paulk Mar 6 '14 at 12:05
<div class="somevalue" style="somevalue"> <input type="text" value="" name="somevalue" id="processing"> </div> the <div> element is created after clicking a tablecell and is destroyed immediately if we click or do anything anywhere else. – Adwait Mar 7 '14 at 4:20
Can you please edit the question, as well as giving the HTML around the div and the javascript that "creates" the div element? There's a difference between the div contents being generated dynamically in response to an event through javascript and the contents being made visible in response to an event. – Kate Paulk Mar 10 '14 at 11:22
Thank you for reply, but the problem has been solved. – Adwait Mar 12 '14 at 4:36
In that case, could you answer your question with the solution you found and mark it as answered? That will help others who have the same problem. – Kate Paulk Mar 12 '14 at 11:06
up vote 0 down vote accepted

I used threading. I put the main thread to sleep. and then started the child thread which was responsible for handling the textbox


child_thread contains code for editing the textbox.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.