コード例 #1
0
        //Consultar Look
        public void ConsultaLook(IWebDriver driver, Look_Dao objLook)
        {
            var primeiroCampo = Tbutil.WaitForFirstExist(driver, Look_Map.TxtSearchNomeLook(driver), 10);

            if (primeiroCampo == true)
            {
                if (!string.IsNullOrEmpty(objLook.SearchNomeLook))
                {
                    Tbreport.GetScreenShot(driver, objLook.SearchNomeLook);
                    Look_Map.TxtSearchNomeLook(driver).Clear();
                    Look_Map.TxtSearchNomeLook(driver).SendKeys(objLook.SearchNomeLook);
                }
                if (!string.IsNullOrEmpty(objLook.SearchCodigoInternoProduto))
                {
                    Tbreport.GetScreenShot(driver, objLook.SearchCodigoInternoLook);
                    Look_Map.TxtSearchCodigoInternoLook(driver).Clear();
                    Look_Map.TxtSearchCodigoInternoLook(driver).SendKeys(objLook.SearchCodigoInternoLook);
                }
                if (!string.IsNullOrEmpty(objLook.SearchCodigoInternoProduto))
                {
                    Tbreport.GetScreenShot(driver, objLook.SearchCodigoInternoProduto);
                    Look_Map.TxtSearchCodigoInternoProduto(driver).Clear();
                    Look_Map.TxtSearchCodigoInternoProduto(driver).SendKeys(objLook.SearchCodigoInternoProduto);
                }
                if (!string.IsNullOrEmpty(objLook.SearchStatus))
                {
                    switch (objLook.SearchStatus)
                    {
                    case "Todos":
                        Look_Map.RdoSearchStatusTodos(driver).Click();
                        Tbreport.GetScreenShot(driver, "SearchStatus");
                        break;

                    case "Ativo":
                        Look_Map.RdoSearcStatusAtivo(driver).Click();
                        Tbreport.GetScreenShot(driver, "SearchStatus");
                        break;

                    case "Inativo":
                        Look_Map.RdoSearchStatusInativo(driver).Click();
                        Tbreport.GetScreenShot(driver, "SearchStatus");
                        break;
                    }
                }
                Look_Map.BtnSearchPsesquisar(driver).Click();
            }
        }