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
abdullah
NA
11
632
Automatically log in to your website using c#
Jun 3 2018 1:06 PM
Hello There,
https://coinpot.co/signin I want to automatically login to this page. I automatically fill in the required fields for this, but when I click on the button, the input is not realized.
I wrote my c # code as follows.
webBrowser1.Document.GetElementById(
"SignInEmailInput"
).SetAttribute(
"value"
, email);
webBrowser1.Document.GetElementById(
"SignInPasswordInput"
).SetAttribute(
"value"
, pass);
HtmlElementCollection elc = webBrowser1.Document.GetElementsByTagName(
"button"
);
foreach
(HtmlElement el
in
elc)
{
if
(el.GetAttribute(
"type"
).Equals(
"submit"
))
{
el.InvokeMember(
"Click"
);
}
}
When I check the page's login button, a script is running.
Button html:
<button type=
"submit"
class=
"btn btn-outline btn-info"
data-bind=
"click: signIn"
>Sign In</button>
Button JScript:
function
(b) {
var
g, m = d()[h];
if
(m) {
try
{
var
k = a.a.O(arguments);
e = f.$data;
k.unshift(e);
g = m.apply(e, k)
}
finally
{
!0 !== g && (b.preventDefault ? b.preventDefault() : b.returnValue = !1)
}!1 === c.get(h +
"Bubble"
) && (b.cancelBubble = !0, b.stopPropagation && b.stopPropagation())
}
}
I do not know about JavaScript. I need your help in coding so I can fix the problem.
Thank you all very much.
Reply
Answers (
1
)
carrotSearchCircles ContextMenu binding on Right Click
How to find user's current location