473,396 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to select a radio button in internet explorer

1
Hy experts

I need a little help here. Can anybody tell me how to select
a radio button from another program knowing the name,id or text of the radio button.
I want to automate internet explorer by checking the "First Name" radio button then pressing the "Send" button.

This is the code I'm using to get the focus to internet explorer:

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Text;
  3. using System.Windows.Forms;
  4. using System.Runtime.InteropServices;
  5.  
  6. public class getWindow
  7. {
  8.   [DllImport("user32.dll")]
  9.   public static extern IntPtr FindWindow(string IpClassName, string IpWindowName);
  10.  
  11.   [DllImport("user32.dll")]
  12.   public static extern int SetForegroundWindow(IntPtr hWnd);
  13.  
  14.   public static void Main(string[] args)
  15.   {
  16.     IntPtr iHandle = FindWindow(null," Details - Windows Internet Explorer");
  17.     SetForegroundWindow(iHandle);
  18.   }
  19. }
  20.  
Any help would be appreciated.
Thank you in advance.
Mar 2 '11 #1
1 2144
HaLo2FrEeEk
404 256MB
I'm not sure exactly how to go about doing this, but a good start might be figuring out what messages IE takes and see if you can send a message to the address bar, then send some javascript to check the radio button.
Mar 4 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: james.dixon | last post by:
Hi I was wondering if anyone else had had this problem before (can't find anything on the web about it). I have three select elements (list boxes - from here on I'll refer to them as 'the...
3
by: Simon | last post by:
Hi, I need to prevent Internet Explorer to save the page in history collection when it is in PostBack. To try do this I have put this code: protected override void OnLoad( EventArgs evt) { if...
1
by: kebabkongen | last post by:
Hi, I'm working on a JavaScript that is enabling / disabling a select element according to whether a checkbox is selected or not. This works fine in Firefox, but in Internet Explorer (v 6.0.2900)...
2
by: Eric Layman | last post by:
Hi, I have a radio button and a combo box. Upon changing a value for radio button, the combo box values will be dynamically updated. I have an idea on how to go abt doing it but Im stuck...
1
by: poopsy | last post by:
hi all, i' hav this question where i have a radio button and select one of 2 choices, whichever i select hav to display in the input box but it doesnt work here is the code <html> <head>...
2
by: sejal17 | last post by:
hello I want to select radio button with the database value. i have three radio button: <input type='radio' name='method' value='Paypal' checked='check'>Paypal <input type='radio'...
5
by: pravinnweb | last post by:
I have a form with lots of select boxes with fixed widths in order to fit in with the design. The problem I have is that some of the values in the options are much wider than the select box so the...
2
by: swethak | last post by:
Hi, I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error...
3
by: kiranbabu | last post by:
<html> <head> <h2 align=center>Blank Tapes Status Form</h2> <br><title>Blank tapes status</title> </head> <body> <br><br> <form name=tapes_status method=post>
1
by: Izzy123 | last post by:
how do we auto selected a radio button when the user enters a numeric value in a textbox? my code for radio button and text box are as follows: <li>Do you like your membership priviledge? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.