Last active
December 10, 2015 14:18
JemmyFX Test for JavaFX using Scala and ScalaTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example.scalajfx | |
import org.scalatest.matchers.ShouldMatchers | |
import org.scalatest.FlatSpec | |
import org.jemmy.fx.SceneDock | |
import org.jemmy.fx.AppExecutor | |
import org.jemmy.fx.control.ToggleButtonDock | |
import org.jemmy.fx.control.LabeledDock | |
class JavaFXExampleSpec extends FlatSpec with ShouldMatchers { | |
AppExecutor.executeNoBlock(classOf[JfxApplication]) | |
val scene = new SceneDock | |
"a button" must "be present." in { | |
val b = new LabeledDock(scene.asParent) | |
b.asText().text() should be ("Click Me") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment