|
-
Jan 4th, 2010, 04:18 PM
#1
Thread Starter
Lively Member
[RESOLVED] Webbrowser & Key strokes
I have been attempting to automate a process in a webbrowser control. When I attempt to fill out the form and submit, I get a false negative response (meaning all the data in the fields are correct but I am getting an incorrect response back from what I should be getting). I have determined that this problem is due to the fact that when I manually type out the data in the input fields a javascript is being fired. I know that you are able to invoke the javascript, but as I have no real knowledge about javascript and the script is rather complex I am stuck.
A temporary solution for me has been to use SendKeys, but this is no real solution at all. If the window loses focus, the entire process goes out the window. I cannot just use the .SetAttribute or .InnerText methods for the elements in the window.
I'm not sure if any of you are familiar with WatiN but I have used it recently while looking for other means to do what I need to do here. Watin works, but instead of allowing me to use an embedded browser object it shells new browser windows. Anyhow, with WatiN I am able to minimize or hide the browser window and the code will still execute. This leads me to believe that there is a way to simulate keypress events in a browser window while making sure that the specific element is the active element.
I have searched all over the internet for this (but am sure I overlooked a few things in frustration) and have yet to find a solution that works for me. If anyone has any information it would be greatly appreciated. Thanks in advance.
-
Jan 6th, 2010, 01:58 AM
#2
Thread Starter
Lively Member
Re: Webbrowser & Key strokes
-
Jan 6th, 2010, 08:02 AM
#3
Thread Starter
Lively Member
Re: Webbrowser & Key strokes
nevermind... i found a fanastic solution. if anyone is looking for something similar message me.
-
Jan 6th, 2010, 02:17 PM
#4
New Member
-
Jan 7th, 2010, 02:33 AM
#5
Thread Starter
Lively Member
Re: [RESOLVED] Webbrowser & Key strokes
i appreciate it but i already got it figured out. the solution was actually pretty simple. there were just a few methods that i was unaware of that helped play a big part in the code for this particular automation. thanks again though.
-
Jan 7th, 2010, 12:57 PM
#6
New Member
Re: [RESOLVED] Webbrowser & Key strokes
oh no i posted that for anyone else who is having problems i read u already got it ^^
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|