Questions tagged as 'junit'

0
answers

Help to get the element through the Selenium xpath

I need help getting element in selenium: Elements name: j_username and name: j_password . <form method="POST" action="j_security_check" onsubmit="return(OnLoginSubmit());"> <input type="hidden" name="operation"> <di...
asked by 10.05.2018 / 17:06
0
answers

Does not handle elements with selenium in Chrome

I'm trying to grab elements from a page but it's not found. Here is the code for the page: <form method="POST" action="j_security_check" onsubmit="return(OnLoginSubmit());"> <input type="hidden" name="operation"> <div st...
asked by 09.05.2018 / 20:46
0
answers

Selenium WebDriver, do not type url in firefox

Code, opens browser but does not type URL, does anyone help? package Navegador; import java.util.concurrent.TimeUnit; import org.junit.Test; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public clas...
asked by 25.04.2018 / 20:05
0
answers

how to apply junit in this case

I have this code: public void registraEntrada() { System.out.print("Digite o seu nome: "); String nome = sc.next(); System.out.print("Digite seu CPF (apenas números): "); String cpf = sc.next(); System.o...
asked by 10.04.2018 / 18:39
0
answers

In what class does jUnit implement its rules?

Hello, I'm thinking of developing my monograph on automated, specific unit testing using the jUnit tool. I would like to know in which class jUnit implements its rules?     
asked by 07.04.2018 / 17:29
0
answers

Enter username and password selenium web driver

How do I enter user and password in a JavaScript message of a web page? I've tried driver.switchTo().alert() but it's not working. I'm using Selenium WebDriver with Junit     
asked by 15.03.2018 / 21:17
1
answer

Does anyone know how I can do Scroll in Selenium Webdriver in JAVA

Code: WebElement emailsecundario = driver.findElement(By.id("RecoveryEmailAddress")); emailsecundario.sendKeys(" [email protected]"); WebElement gravar = driver.findElement(By.id("submitbutton")); gravar.click(); Does anyone know...
asked by 25.07.2017 / 19:01
1
answer

How to integrate CDI-Unit with Jersey Test Framework?

Hello. I'm working on a ws rest with CDI and Jersey. I want to create a unit of tests with JUnit and due to the CDI I ended up using the CDI-Unit Runner. I found the CDI-Unit simpler than WeldJUnit4Runner. Now, I need to add the Jersey Tes...
asked by 27.05.2017 / 08:12
1
answer

How to compare two ListFloat in Junit?

I need to compare two List, and in my test I used assertEquals(lista1, lista2); Assert.assertTrue(lista1.containsAll(lista2)); And the error that the test shows is    (index: 22 size: 22) java.lang.IndexOutOfBoundsException Until tod...
asked by 05.03.2017 / 23:05
1
answer

Unit Tests with Jhipster + Spring

I need to write some unit tests on a project that uses Jhispter which in turn uses Springboot . I am not able to inject a repository for example in the test class, I have been given an exception. I would like to know the best way to write the...
asked by 04.01.2017 / 18:48