I am making a simple application which can login my internet page which i have to do manually whenever i open my computer, so i am noob in programming, i made a application which can fill me username and password form but there is no id or name for submit button, so is there any possibility to click with x,y axis or anything else.
here is the code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace Wateen_Auto_Login
{
public partial class Main : Form
{
public Main()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
timer1.Stop();
webBrowser1.Navigate("http://internet.wateen.net/home?t=g150nzv0");
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
webBrowser1.document.GetElementById("Username").SetAttribute("value", txtname.Text);
webBrowser1.document.GetElementById("Password").SetAttribute("value", txtpass.Text);
}
private void txtname_TextChanged(object sender, EventArgs e)
{
}
}
}

New Topic/Question
Reply




MultiQuote






|