Commented the configuration methods to move on to the OCR part
This commit is contained in:
@@ -39,6 +39,9 @@ namespace Test_Merge
|
||||
GrandPrixUrl = grandPrixUrl;
|
||||
Ready = false;
|
||||
}
|
||||
/// <summary>
|
||||
/// Will start the python programm that runs the Cookie Recovering
|
||||
/// </summary>
|
||||
private void StartCookieRecovering()
|
||||
{
|
||||
string scriptPath = PYTHON_COOKIE_RETRIEVAL_FILENAME;
|
||||
@@ -51,6 +54,13 @@ namespace Test_Merge
|
||||
string output = process.StandardOutput.ReadToEnd();
|
||||
process.WaitForExit();
|
||||
}
|
||||
/// <summary>
|
||||
/// Method that will recover the needed cookies in the DB
|
||||
/// </summary>
|
||||
/// <param name="host"> The host of the wanted cookie ex: ./formula1.com</param>
|
||||
/// <param name="name">The name of the wanted cookie ex: login</param>
|
||||
/// <returns>returns the value of the cookie if it has been found</returns>
|
||||
/// <exception cref="InvalidOperationException"></exception>
|
||||
public string GetCookie(string host, string name)
|
||||
{
|
||||
StartCookieRecovering();
|
||||
@@ -88,6 +98,10 @@ namespace Test_Merge
|
||||
|
||||
return value;
|
||||
}
|
||||
/// <summary>
|
||||
/// Starts the headless browser
|
||||
/// </summary>
|
||||
/// <returns>Error code 1xx</returns>
|
||||
public async Task<int> Start()
|
||||
{
|
||||
Ready = false;
|
||||
@@ -248,6 +262,11 @@ namespace Test_Merge
|
||||
Ready = true;
|
||||
return 0;
|
||||
}
|
||||
/// <summary>
|
||||
/// Takes a screenshot of what the headless browser is displaying
|
||||
/// </summary>
|
||||
/// <param name="name">Optional ! The name of the picture so it can be saved</param>
|
||||
/// <returns>Returns the screenshot in the bitmap format</returns>
|
||||
public Bitmap Screenshot(string name = "TEST")
|
||||
{
|
||||
Bitmap result = new Bitmap(4242, 6969);
|
||||
@@ -273,11 +292,17 @@ namespace Test_Merge
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// Stops the Emulation. Note: if you plan to start it again please use ResetDriver() instead
|
||||
/// </summary>
|
||||
public void Stop()
|
||||
{
|
||||
Ready = false;
|
||||
Driver.Dispose();
|
||||
}
|
||||
/// <summary>
|
||||
/// Resets the emulation
|
||||
/// </summary>
|
||||
public void ResetDriver()
|
||||
{
|
||||
Ready = false;
|
||||
|
||||
Reference in New Issue
Block a user