c# - SetAttribute not working in WebBrowser Control -
i developing automation windows application in c# using web browser control. set values controls, using setattribute property. works fine controls text box consist watermarking
for example
the next coding
webbrowser.document.getelementbyid("ctl00_content1_dob_txbx").setattribute("value", "09/17/1976");
while running application, textbox holds value watermarking
for example
while clicking submit button date getting vanish. how can set date in watermarking text box?
how can accomplish next output
note: in website watermark achieved ajax watermarkextender
i have found solution have set value in webbrowser_progresschanged event works fine
private void automationwebbrowser_progresschanged(object sender, webbrowserprogresschangedeventargs e) { if (automationwebbrowser.document.getelementbyid("ctl00_content1_dob_txbx") != null) automationwebbrowser.document.getelementbyid("ctl00_content1_dob_txbx").setattribute("value", "09/17/1976"); }
c# browser setattribute
No comments:
Post a Comment