Created
July 29, 2011 09:14
-
-
Save Stuk/1113494 to your computer and use it in GitHub Desktop.
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
import com.opera.core.systems.*; | |
import com.opera.core.systems.settings.OperaDriverSettings; | |
import org.openqa.selenium.*; | |
import java.util.*; | |
import org.openqa.selenium.interactions.*; | |
class Example { | |
public static void main(String[] args) { | |
OperaDriver driver = new OperaDriver(); | |
driver.get("/tmp/fixtures/issue12.html"); | |
String xpathExpression = "//select[@id='stammdatenForm:userTypeInput']/option"; | |
final List<WebElement> elements = driver.findElementsByXPath(xpathExpression); | |
for (WebElement el : elements) { | |
System.out.println(el.getText()); | |
} | |
driver.quit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment