views:

539

answers:

2

Hi,

I could not figure out how to enter text into HTML Editor using Watin. I tried //ie.TextField(Find.ById("htmlDetail_ctl06_ctl04")).TypeText("ABCD"); But got error: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.

Can you give some example how to enter text into AJAX HTML Editor using watin please? I am not sure what to plug in frameSrc and java script from this solution - http://stackoverflow.com/questions/939448/unit-testing-the-ms-ajax-toolkit-html-editor

Here is html from Develper tool when click the text box:

Thanks in advance

A: 

Hope, it helps.

Link lnk = ie.Link(Find.ById("edButtonHTML")); ie.WaitForComplete(); lnk.Click(); ie.WaitForComplete();

ie.TextField(Find.ByName("content")).TypeText("I am Amit chadha"); ie.WaitForComplete();

:-)

Amit Chadha
A: 

no Amit this code is not working.

TextField pass = ie.TextField(Find.ByName("password"));

pass.TypeText("1234rewq");

and this is the website check the password field http://www.myyearbook.com/?mysession=cmVnaXN0cmF0aW9uX3JlZ2lzdHJhdGlvbiZyZWZlcnJlcj0w

Rizwan Ahmed