Load a webpage and click a button using C #

I have a requirement to automate a procedure on a web page.

  • Open the web page
  • Find entrance
  • Click on it
  • Close the web page

I would like to achieve all of the above using c#

in console application

. I don't want to open any browser, just some code to automate this process.

I have URL

a web page as well as an ID

input element.

What C # code should I use to achieve this?

+3


source to share


1 answer


I think it can probably serve a purpose.

Selenium 1 (Selenium RC) : A Selenium server that starts and kills browsers, interprets and runs Selenese commands passed from the test program , and acts as an HTTP proxy, intercepting and inspecting HTTP messages passed between the browser and AUT.

Selenium Server receives Selenium commands from your test program, interprets them, and returns the results of these tests to your program.



The RC server bundles Selenium Core and injects it into the browser automatically. This happens when your test program opens a browser (using the client library API function). Selenium-Core is a JavaScript program, actually a set of JavaScript functions, that interprets and executes Selenese commands using the browser's built-in JavaScript interpreter.

The server receives Selenese commands from your test program using simple HTTP GET / POST requests. This means that you can use any programming language that can send HTTP requests to automate Selenium tests in the browser.

More details: you can visit Selenium

+1


source







All Articles