html#

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>naver_home</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">naver_home</td></tr>
</thead><tbody>
<tr>
	<td>open</td>
	<td>http://dna.naver.com</td>
	<td></td>
</tr>
<tr>
	<td>createCookie</td>
	<td>nid_enctp=1</td>
	<td>domain=.naver.com,path=/</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>//img[@alt='상세검색']</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>//input[@id='id']</td>
	<td>사용아이디</td>
</tr>
<tr>
	<td>typeKeys</td>
	<td>//input[@id='pw']</td>
	<td>사용패스워크</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>//input[@id='submit_img']</td>
	<td></td>
</tr>

</tbody></table>
</body>
</html>

java#

package com.example.tests;

import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;

public class naver_home extends SeleneseTestCase {
	public void setUp() throws Exception {
		setUp("http://change-this-to-the-site-you-are-testing/", "*chrome");
	}
	public void testNaver_home() throws Exception {
		selenium.open("http://dna.naver.com");
		selenium.createCookie("nid_enctp=1", "domain=.naver.com,path=/");
		selenium.click("//img[@alt='상세검색']");
		selenium.waitForPageToLoad("30000");
		selenium.type("//input[@id='id']", "사용아이디");
		selenium.typeKeys("//input[@id='pw']", "사용패스워크");
		selenium.click("//input[@id='submit_img']");
		selenium.waitForPageToLoad("30000");
	}
}

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 28-Feb-2010 15:51 by DongGukLee  
G’day (anonymous guest) My Prefs

Referenced by
Theory

JSPWiki v2.8.4