Skip to content

Instantly share code, notes, and snippets.

@rladstaetter
Last active December 10, 2015 14:18
Show Gist options
  • Save rladstaetter/4446603 to your computer and use it in GitHub Desktop.
Save rladstaetter/4446603 to your computer and use it in GitHub Desktop.
JemmyFX Test for JavaFX using Scala and ScalaTest
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