Tuesday 25 October 2016

login script - Is There An HTML Function To Execute href?



I have an HTML log-on script that when it is executed it opens a webpage and logs me in. It works, but after the log-on page, there's another webpage that opens that I need to click a link on to gain entry to the site



I have tried to add an additional body to my HTML script that is based on an autoClick function to click on the href on the next screen, but it doesn't work.



this code works and logs me in:




 

MSP_P2_LogIn




method="post">
value="MYUSERNAME">
id="passwordText" value="MYPASSWORD">






this is my attempt to click the link on the second page:



 

MSP_P2_LogIn





value="MYUSERNAME">
id="passwordText" value="MYPASSWORD">




P2

Test





Below is the source code from (https://tnt.fnfismd.com/iportal25/RegionChoice.aspx). The href is contained in a form, but I don't know how to either submit the form to press the correct link or if I can click the link without submitting another form?



P2 Test 






value="CE974B8E">

value="">



I expect to be able to log into this site (https://tnt.fnfismd.com/), which works with the first HTML script. Then after I'm logged in, this page automatically displays (https://tnt.fnfismd.com/iportal25/RegionChoice.aspx) and I need to click the href. I'm new to this and I'm stuck...


Answer



I got this working. Anyone who needs to log into MSP can use the below HTML script:



 

MSP_Prod_LogIn





value="[Enter Password Here]">




Then execute in C++ like this:




public void button1_Click(object sender, EventArgs e) 
{
System.Diagnostics.Process.Start(@"iexplore.exe",
@"C:\HTML_Log_On_Scripts\MSP_Prod_Login.html");
}


Works like a charm


No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...