-2

I have a requirement where i need to login to multiple sites (http://www.XXXXXX.com) and give my credentials (Id and Pass). After logging in, i have to click on particular link and need to select the date range and status level for all tasks in combo boxes. Then we will get the required information.

To avoid this all manual process, i would like to automate this in C# (Windows application). Can anyone please help me how to achieve this? Thanks in advance.

  • 2
    Could you demonstrate what you have attempted to do so far please? – Alex Woodhead Mar 14 '16 at 10:53
  • Actually i thought of writing a SQL scripts from the backend and bind it to the gridview. But i got to know that we don't have access to sql backend. So posted a query. – user1191818 Mar 15 '16 at 06:52

2 Answers2

1

A possible solution could be using Selenium for this. With the Selenium webdriver you can easy fetch data from your web page.

With Selenium you could use FindElement(ById... And use the GetText option to get your specific data.

Anand
  • 1,899
  • 1
  • 13
  • 23
  • Hi, Sorry for the late reply. Thanks for the suggestion and can you please please tell me how we can get the data by Selenium (not code, but the way of getting the text from the website). – user1191818 Mar 30 '16 at 10:01
-1

You could also use HtmlAgilityPack. Authentification is possible with

using HtmlAgilityPack;

var htmlWeb = new HtmlWeb();
htmlWeb.PreRequestHandler += (request) => 
{
    request.Credentials = new NetworkCredential("login", SecureString);
    return true; 
};

Check this post for more informations..

Community
  • 1
  • 1
informaticienzero
  • 1,796
  • 1
  • 12
  • 22
  • Thanks for sharing the link. I saw the link and i think we have to do this by using ASP.net right!! Can you please describe more how to achieve.. Never mind. – user1191818 Mar 15 '16 at 06:56