Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Problema ao selecionar Categoria

Olá pessoal,

Estou recebendo a seguinte exception no momento de seleção da categoria.

OpenQA.Selenium.ElementNotInteractableException: element not interactable

Segue minha classe PO:

public class NovoLeilaoPO
    {
        private IWebDriver driver;

        private By byInputTitulo;
        private By byInputDescricao;
        private By byInputCategoria;
        private By byInputValorInicial;
        private By byInputImagem;
        private By byInputInicioPregao;
        private By byInputTerminoPregao;

        public NovoLeilaoPO(IWebDriver driver)
        {
            this.driver = driver;

            byInputTitulo = By.Id("Titulo");
            byInputDescricao = By.Id("Descricao");
            byInputCategoria = By.Id("Categoria");
            byInputValorInicial = By.Id("ValorInicial");
            byInputImagem = By.Id("ArquivoImagem");
            byInputInicioPregao = By.Id("InicioPregao");
            byInputTerminoPregao = By.Id("TerminoPregao");
        }

        public NovoLeilaoPO Visita()
        {
            driver.Navigate().GoToUrl(TestHelper.PaginaCadastroLeilao);

            return this;
        }

        public NovoLeilaoPO PreencheFormulario(
            string titulo,
            string descricao,
            string categoria,
            decimal valorInicial,
            string imagem,
            DateTime inicioPregao,
            DateTime fimPregao)
        {
            driver.FindElement(byInputTitulo).SendKeys(titulo);
            driver.FindElement(byInputDescricao).SendKeys(descricao);
            driver.FindElement(byInputCategoria).SendKeys(categoria);
            driver.FindElement(byInputValorInicial).SendKeys(valorInicial.ToString());
            driver.FindElement(byInputImagem).SendKeys(imagem);
            driver.FindElement(byInputInicioPregao).SendKeys(inicioPregao.ToString());
            driver.FindElement(byInputTerminoPregao).SendKeys(fimPregao.ToString());

            return this;
        }
    }
1 resposta
solução!

Encontrei a solução aqui no fórum, no tópico "Ao executar teste o campo categoria apresenta erro"

https://cursos.alura.com.br/forum/topico-ao-executar-teste-o-campo-categoria-apresenta-erro-86993

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software