Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
1.7 kB
5
Indexable
Never
  public static void OdabirDoktora(IWebDriver driver, string reason, string email, string doctorCode, string teamCode, bool isPotential, string denialReq)
    {        
        var izbor = new NewDoctorRequest(driver);        
        if(reason == "01")
            TestCase1.OdabirOsobe(driver, "58962605964");
        else
            TestCase1.OdabirOsobe(driver, "05467164050");

        izbor._btnNewDoctorRequest.Click();        
        izbor._email.SendKeys(email);
        izbor._date.Click();
        izbor._datePicker.Click();
        izbor._denialRequest.SendKeys(denialReq);

        if (isPotential == true)
        {
            izbor._btnNewPotRequest.Click();
            izbor._doctorPotEnterCode.SendKeys(doctorCode);    
            izbor._doctorPotLoad.Click();
            Thread.Sleep(1000);       
        }
        else
        {
            Thread.Sleep(500);
            izbor._requestReason.SendKeys(reason);
            izbor._selectReason.Click();
            izbor._doctorEnterCode.SendKeys(doctorCode);    
            izbor._doctorLoad.Click(); 
            izbor._teamEnterCode.SendKeys(teamCode);
            Thread.Sleep(1000);
            izbor._teamLoad.Click();
        }
        izbor._btnCreate.Click();
        Thread.Sleep(500);
        izbor._btnConfirm.Click();

        if(reason == "06")          
            Assert.IsTrue(izbor._requestStatus.Text.Contains("7 - Posebno povjerenstvo"));
        else if(reason == "16")
            Assert.IsTrue(izbor._requestStatus.Text.Contains("6 - Dodatna provjera"));
        else
            Assert.IsTrue(izbor._requestStatus.Text.Contains("8 - Proveden"));
    }