We are integrating PayPal Express Checkout into our e-commerce application. The way this works is there a "gateway" that connects the website to the PayPal servers via the PayPal SDKs. I am writing integration tests for that API in Visual Studio. With regular API tests, it is possible to chain requests in any order and run tests. Here is the flow with a typical Express Checkout Integration SetExpressCheckout Call -> get token and login with buyer account (in a browser) -> Optional GetExpressCheckout Call -> DoExpressCheckout Call -> DoAuthorize Call -> DoCapture Call
The issue is that I am unable to simulate the browser login without breaking the test flow. I need to be able to start the test, have the test class open a browser window. I can login there and close the window. Now, I need the test to detect the browser closure and then process with DoExpressCheckout and the subsequent tests. Can this be achieved ?
I searched for some tools but all I get is browser automation. It does not apply to me because at this point I do not have a website to work with. I am just going off of JSON request to my "gateway".