I'm doing a bot for an online game, the program consists on a series of tabs, the first one contains the webBrowser component that automatically navigates, and I need to do some automatic web actions such as typing a textbox, changing radiobuttons and submiting buttons. I'm actually doing this screen:
http://img.photobucket.com/albums/v2...psf78d81f4.png
for the textboxes(1 and 2) I use the folowing code, I asume that is correct, as I used the same procedure in other screens:
The HTML code for the 2 area is the folowing:
And my program:
Now, for the radio at 3 I'm lost, I have no idea of how auto-change it to the second option, here is the HTML code:
And the last part, submiting the button at the bottom of the screen, this is his HTML:
and my program just goes with:
So, basically, how I change the radio to the second option, then I will test the whole sub.
thanks!!!!
http://img.photobucket.com/albums/v2...psf78d81f4.png
for the textboxes(1 and 2) I use the folowing code, I asume that is correct, as I used the same procedure in other screens:
The HTML code for the 2 area is the folowing:
Code:
<div class="coordinatesInput">
<div class="xCoord">
<label for="xCoordInput">X:</label>
<input maxlength="4" value="" name="x" id="xCoordInput" class="text coordinates x " />
</div>
<div class="yCoord">
<label for="yCoordInput">Y:</label>
<input maxlength="4" value="" name="y" id="yCoordInput" class="text coordinates y " />
</div>
<div class="clear"></div>
</div>
Code:
Dim troop_1_text As HtmlElement = Me.wb.Document.All.Item("t1")
Dim x_text As HtmlElement = Me.wb.Document.All.Item("x")
Dim y_text As HtmlElement = Me.wb.Document.All.Item("y")
troop_1_text.InnerText = (Targets.t(x).raid_ratio / 60).ToString
x_text.InnerText = Targets.t(x).x.ToString
y_text.InnerText = Targets.t(x).y.ToString
Now, for the radio at 3 I'm lost, I have no idea of how auto-change it to the second option, here is the HTML code:
Code:
<div class="option">
<label> <input type="radio" class="radio" name="c" value="2"
checked="checked" />
Refuerzos </label>
<br /> <label> <input type="radio" class="radio" name="c"
value="3" />
Ataque: normal </label> <br /> <label> <input type="radio" class="radio" name="c"
value="4" />
Ataque: atraco </label>
</div>
Code:
<button type="submit" value="ok" name="s1" id="btn_ok" title="enviar">
Code:
wb.Document.Forms(0).InvokeMember("s1")
thanks!!!!