TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Index OnIndia
NA
15
1.6k
Program to automate multiple ID (input)verification in URL
Jul 16 2019 12:14 AM
A program to automate the process of checking a set of UserIds passing as a input to a webform in a url and get the status using webbrowser . for Single Ids its working , but to automate for N number of ids, loop is not working but taking the last id and returns the output.
private
void
button2_Click(
object
sender, EventArgs e)
{
string
url =
"https://www.verifyids.xhtml"
;
WebBrowser b =
new
WebBrowser();
b.ScriptErrorsSuppressed =
true
;
b.DocumentCompleted +=
new
WebBrowserDocumentCompletedEventHandler(b_DocumentCompleted);
b.Navigate(url);
}
private
void
b_DocumentCompleted(
object
sender, WebBrowserDocumentCompletedEventArgs e)
{
for
(
int
i = 0; i <= 4; i++)
{
WebBrowser b = sender
as
WebBrowser;
b.Document.GetElementById(
"idnumber"
).InnerText = idarray[i];
//string
listobj = b.Document.GetElementsByTagName(
"select"
)[0].GetElementsByTagName(
"option"
)[1].SetAttribute(
"selected"
,
"selected"
);
// string
response = b.DocumentText;
b.Document.GetElementById(
"frmType1"
).SetAttribute(
"value"
,
"24Q"
);
HtmlElement btnlink = b.Document.GetElementById(
"clickGo1"
);
btnlink.InvokeMember(
"Click"
);
b.DocumentCompleted -=
new
WebBrowserDocumentCompletedEventHandler(b_DocumentCompleted);
b.DocumentCompleted +=
new
WebBrowserDocumentCompletedEventHandler(b_result);
}
enter code here
}
Reply
Answers (
0
)
send message to user mobile when register fully completed
how the update works in windows application