You have two buttons with given xpath on this page, first is not visible, thats why you are getting ElementNotVisibleException One is under <div class="loginPopup"> Second (the one you need)...
  • April 4, 2022
  • 0 Comments
JPanel doesn’t have ActionListener capabilities. Instead, you need to use a MouseListener import java.awt.Color; import java.awt.Container; import java.awt.Dimension; import java.awt.EventQueue; import java.awt.GridLayout; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.JFrame; import javax.swing.JPanel; public class CoordBoutons...
  • April 4, 2022
  • 0 Comments
You should use a while loop: The dice are rolled again and again until the player has won or lost (then, break ends the while loop). while (true) { int dice1=(int)(Math.random()*6+1);...
  • April 4, 2022
  • 0 Comments