Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.thoughtworks.selenium.*;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
- import static org.junit.Assert.*;
- import java.util.regex.Pattern;
- public class WikimediaUseThisFile {
- private Selenium selenium;
- @Before
- public void setUp() throws Exception {
- selenium = new DefaultSelenium("localhost", 4444, "*chrome", "https://commons.wikimedia.org/");
- selenium.start();
- }
- @Test
- public void testWikimediaUseThisFile() throws Exception {
- selenium.open("/wiki/File:Maitreya_Buddha%2C_Nubra.jpg");
- selenium.click("css=a[title=\"Use this file on the web\"] > b");
- selenium.click("id=stockphoto_attribution_html");
- selenium.click("id=stockphoto_attribution");
- }
- @After
- public void tearDown() throws Exception {
- selenium.stop();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement