second scenario in my cucumber feature file is not executing - maven

I'm trying to learn Cucumber with selenium java . have written two scenario's , when i run my feature file which contains two scenarios , only scenario #1 is executing , for scenario #2 its throwing Java null pointer exception
Feature: POC of my framework works
Scenario: Login test
Given I navigate to the Bugzilla website
When I click on login
And I enter the values
Then I check to see if i was successfully loged in or not
Scenario: File a bug test
Given I navigate to the File a bug page
When I click on widgets
And I enter the bug details
Then Bug should be submited succefully
My step definition file :
package cucumber.features;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;
import cucumber.api.java.en.And;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
public class StepDefinitions1 {
protected WebDriver driver;
protected String baseUrl;
// Scenario 1
#Given("^I navigate to the Bugzilla website$")
public void I_navigate_to_the_Bugzilla_website() throws Throwable {
driver = new FirefoxDriver();
baseUrl ="https://landfill.bugzilla.org/bugzilla-4.4-branch/index.cgi";
driver.get(baseUrl);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
#When("^I click on login$")
public void I_click_on_login() throws Throwable {
driver.findElement(By.id("login_link_top")).click();
}
#And("^I enter the values$")
public void I_enter_the_values() throws Throwable {
driver.findElement(By.id("Bugzilla_login_top")).clear();
driver.findElement(By.id("Bugzilla_login_top")).sendKeys("jeevan.anekal#gmail.com");
driver.findElement(By.id("Bugzilla_password_top")).clear();
driver.findElement(By.id("Bugzilla_password_top")).sendKeys("testuser#123");
driver.findElement(By.id("log_in_top")).click();
}
#Then("^I check to see if i was successfully loged in or not$")
public void I_check_to_see_if_i_was_successfully_loged_in_or_not() throws Throwable {
System.out.println("Login Successfull");
}
// Scenario 2
#Given("^I navigate to the File a bug page$")
public void I_navigate_to_the_File_a_bug_page() throws Throwable {
driver.findElement(By.id("enter_bug")).click();
}
#When("^I click on widgets$")
public void I_click_on_widgets() throws Throwable {
driver.findElement(By.linkText("Widgets")).click();
}
#And("^I enter the bug details$")
public void I_enter_the_bug_details() throws Throwable {
new Select(driver.findElement(By.id("bug_severity"))).selectByVisibleText("trivial");
new Select(driver.findElement(By.id("cf_drop_down"))).selectByVisibleText("---");
new Select(driver.findElement(By.id("rep_platform"))).selectByVisibleText("Macintosh");
new Select(driver.findElement(By.id("op_sys"))).selectByVisibleText("Mac OS X 10.0");
driver.findElement(By.id("short_desc")).clear();
driver.findElement(By.id("short_desc")).sendKeys("OS crashed");
driver.findElement(By.id("comment")).clear();
driver.findElement(By.id("comment")).sendKeys("Os debugging issue");
}
#Then("^Bug should be submited succefully$")
public void Bug_should_be_submited_succefully() throws Throwable {
System.out.println("Bug submitted successfully");
}
}

Looks like you are not calling the browser and navigating to the page in scenario 2
You need do do something similar to this
#Given("^I navigate to the File a bug page$")
public void I_navigate_to_the_File_a_bug_page() throws Throwable {
driver = new FirefoxDriver();
baseUrl ="https://landfill.bugzilla.org/bugzilla-4.4-nch/index.cgi";
driver.get(baseUrl);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.findElement(By.id("enter_bug")).click();
enter code here
}
or use #Before hooks to initialize the browser

I think I kind get your problem here. I had encountered similar problem before.
So when running the feature file, either by clicking on the run button from the bar or right click in the feature file then run..., take a look at what it says when actually clicking it. Because if you hover over a certain scenario and click run, it will only run that scenario, not the whole feature file where there is more than 1 scenarios.

Related

SWT Dialog does not display correctly

When opening a new dialog, while its loading, you click couple of times on parent shell, apparently the new dialog does not display correctly.
Please see the example below:
Examples
https://i.stack.imgur.com/ZovxE.png (eclipse IDE example)
https://i.stack.imgur.com/5zVar.png
https://i.stack.imgur.com/u86b9.png
https://i.stack.imgur.com/FGaAr.png
Initially I encountered the problem in december 2014, and back then also reported by vaious in house devlopers which were using different development systems and then same problem has been reported by our several customers.
This behavior can be reproduced using following environment:
Windows Version: 7 Pro 64 Bit - 6.1.7601
Java Version: RE 1.8.0_121_b13
SWT Versions
3.8.2
4.6.2
4.7M6
I20170319-2000
I could only reproduce the problem on Windows 7 with the windows basic theme/design/style (not with classic or aero).
On windows 10 its not reproducible.
reproduce
code to reproduce
package test;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
public class Main {
public static void main(String[] args) {
Display display = new Display();
final Shell shell = createShell(display);
createButton(shell);
shell.open();
eventLoop(display, shell);
display.dispose();
}
private static Shell createShell(Display display) {
final Shell shell = new Shell(display);
shell.setLayout(new RowLayout());
shell.setSize(500, 200);
return shell;
}
private static void createButton(final Shell shell) {
final Button openDialog = new Button(shell, SWT.PUSH);
openDialog.setText("Click here to open Dialog ...");
openDialog.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
TestDialog inputDialog = new TestDialog(shell);
inputDialog.open();
}
});
}
private static void eventLoop(Display display, final Shell shell) {
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
}
}
class TestDialog extends Dialog {
public TestDialog(Shell parent) {
super(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.MIN | SWT.MAX | SWT.RESIZE);
setText("Dialog");
}
public void open() {
Shell shell = new Shell(getParent(), getStyle());
shell.setText(getText());
createContents(shell);
shell.pack();
initializeBounds(shell);
shell.open();
eventLoop(shell);
}
private void createContents(final Shell shell) {
shell.setLayout(new GridLayout(2, true));
Label label = new Label(shell, SWT.NONE);
label.setText("Some Label text ...");
final Text text = new Text(shell, SWT.BORDER);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
text.setLayoutData(data);
createCloseButton(shell);
/* time for the user to create the misbehavior */
try {
Thread.sleep(15000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
private void createCloseButton(final Shell shell) {
Button closeButton = new Button(shell, SWT.PUSH);
closeButton.setText("Close");
GridData data = new GridData(GridData.FILL_HORIZONTAL);
closeButton.setLayoutData(data);
closeButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
shell.close();
}
});
shell.setDefaultButton(closeButton);
}
private void initializeBounds(Shell shell) {
Rectangle bounds = shell.getBounds();
Rectangle parentBounds = getParent().getBounds();
bounds.x = parentBounds.x;
bounds.y = parentBounds.y;
shell.setBounds(bounds);
}
private void eventLoop(Shell shell) {
Display display = getParent().getDisplay();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
}
}
steps to reproduce
Start the application
it should look like: https://i.stack.imgur.com/dMJ9e.png
Click on the button.
Keep continuously clicking on right bottom corner of the parent shell (avoid hitting the new opening dialog), till mouse cursor changes to wait icon and parent shell changes its color.
it should look as following: https://i.stack.imgur.com/c1Ikp.png
Wait until the new dialog appears.
it looks likes as following: https://i.stack.imgur.com/kTDgQ.png (incorrectly displayed)
instead: https://i.stack.imgur.com/cHVjn.png (correctly displayed)
steps to reproduce done in video
https://youtu.be/7ukhloCPf0k
When you mouse hover some of the UI elements (the originally not correctly drawn), you can notice some of them to be get painted (e.g. table rows).
https://i.stack.imgur.com/kkMKn.png (before opening the dialog)
https://i.stack.imgur.com/ZXIKc.png (after opening the dialog)
https://i.stack.imgur.com/25M7S.jpg (after mouse over)
Even calling Shell.update() or Shell.redraw() after the Dialog opened does not fix it.
In Windows Performance Options -> Visual Effects -> disable "Use visual styles on windows and buttons" is the only option I found which provides a workaround,
which seems to be the same as changing the design/theme/style to classic.
https://www.sevenforums.com/tutorials/1908-visual-effects-settings-change.html (How to Change Windows Visual Effects)
In the end, I have following questions:
Is it a SWT or Windows problem?
Is there any related topic in bug entries for Windows or in Eclipse Bugzilla?
Is there someone else who experienced the same problem? please share the experience.
Is there any settings in SWT or Windows which could affect its look n feel and fix the problem?
In the end, I have following questions: Is it a SWT or Windows problem?
Neither. As others have mentioned, you certainly should not tie up the UI thread with any long-running task. That work belongs in a background thread.
In regards to using a background thread, there are several ways you could go about this depending on how you want your Dialog to behave.
One option would be to kick off the background thread and then open the dialog when the task is done. I personally don't care for this because while the task is running, a user may think that nothing is happening.
Another option would be to open the dialog but display a "Loading" message, or something to that effect to give meaningful feedback and let a user know that the application isn't frozen (like how it looks/responds in your example).
The strategy would be to:
Create the dialog
Start the long task on a background thread and register a callback
Open the dialog with a "Loading" message
When the task is complete, the dialog will be updated from the callback
If you search around a bit on using Executors, you should find some far better examples and detail on how to use them.
Here's a brief example to illustrate what that might look like:
(Note: There are definitely a few issues with this code, but for the sake of brevity and illustrating the point I opted for a slightly naive solution. Also there are Java 8-esque ways that would be a bit shorter, but again, this illustrates the idea behind using a background thread; the same concepts apply)
Given a Callable (or Runnable if you don't need a return value),
public class LongTask implements Callable<String> {
#Override
public String call() throws Exception {
Thread.sleep(15000);
return "Hello, World!";
}
}
You can use the Executors class to create a thread pool, and then an ExecutorService to submit the Callable for execution. Then, using Futures.addCallback(), you can register a callback which will execute one of two methods depending on whether the task was successful or failed.
final ExecutorService threadPool = Executors.newFixedThreadPool(1);
final ListeningExecutorService executorService = MoreExecutors.listeningDecorator(threadPool);
final ListenableFuture<String> future = executorService.submit(new LongTask());
Futures.addCallback(future, new FutureCallback(){...});
In this case I used the Google Guava implementation ListeningExecutorService which makes things a bit cleaner and simpler, in my opinion. But again, you may not even need this if you opt for a more "Java 8" approach.
As for the callback, when the task is successful, we update the Dialog with the results. If it fails, we can update it with something to indicate failure:
public static class DialogCallback implements FutureCallback<String> {
private final MyDialog dialog;
public DialogCallback(final MyDialog dialog) {
this.dialog = dialog;
}
#Override
public void onSuccess(final String result) {
dialog.getShell().getDisplay().asyncExec(new Runnable() {
#SuppressWarnings("synthetic-access")
#Override
public void run() {
dialog.setStatus(result);
}
});
}
#Override
public void onFailure(final Throwable t) {
dialog.getShell().getDisplay().asyncExec(new Runnable() {
#SuppressWarnings("synthetic-access")
#Override
public void run() {
dialog.setStatus("Failure");
}
});
}
}
In this case I opted for the Callable to return a String, thus the FutureCallback should be parameterized with String. You may want to use some other class that you created, which will work just as well.
Notice that we use the Display.asyncExec() method to ensure that the code which updates the UI runs on the UI thread, because the callback may execute on the background thread.
Like I said, there are still a few issues here, including what happens when you click the cancel button before the task completes, etc. But hopefully this helps illustrate an approach for handling long-running background tasks without blocking the UI thread.
Full example code:
public class DialogTaskExample {
private final Display display;
private final Shell shell;
private final ListeningExecutorService executorService;
public DialogTaskExample() {
display = new Display();
shell = new Shell(display);
shell.setLayout(new GridLayout());
executorService = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(1));
final Button button = new Button(shell, SWT.PUSH);
button.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
button.setText("Start");
button.addSelectionListener(new SelectionAdapter() {
#SuppressWarnings("synthetic-access")
#Override
public void widgetSelected(final SelectionEvent e) {
final MyDialog dialog = new MyDialog(shell);
dialog.setBlockOnOpen(false);
dialog.open();
dialog.setStatus("Doing stuff...");
final ListenableFuture<String> future = executorService.submit(new LongTask());
Futures.addCallback(future, new DialogCallback(dialog));
}
});
}
public void run() {
shell.setSize(200, 200);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
executorService.shutdown();
display.dispose();
}
public static void main(final String... args) {
new DialogTaskExample().run();
}
public static class DialogCallback implements FutureCallback<String> {
private final MyDialog dialog;
public DialogCallback(final MyDialog dialog) {
this.dialog = dialog;
}
#Override
public void onSuccess(final String result) {
dialog.getShell().getDisplay().asyncExec(new Runnable() {
#SuppressWarnings("synthetic-access")
#Override
public void run() {
dialog.setStatus(result);
}
});
}
#Override
public void onFailure(final Throwable t) {
dialog.getShell().getDisplay().asyncExec(new Runnable() {
#SuppressWarnings("synthetic-access")
#Override
public void run() {
dialog.setStatus("Failure");
}
});
}
}
public static class LongTask implements Callable<String> {
/**
* {#inheritDoc}
*/
#Override
public String call() throws Exception {
Thread.sleep(15000);
return "Hello, World!";
}
}
public static class MyDialog extends Dialog {
private Composite baseComposite;
private Label label;
/**
* #param parentShell
*/
protected MyDialog(final Shell parentShell) {
super(parentShell);
}
/**
* {#inheritDoc}
*/
#Override
protected Control createDialogArea(final Composite parent) {
baseComposite = (Composite) super.createDialogArea(parent);
label = new Label(baseComposite, SWT.NONE);
return baseComposite;
}
public void setStatus(final String text) {
label.setText(text);
baseComposite.layout();
}
}
}
The code seems to be straight forward, only that you are making the main Thread sleep for 15secs hence the delay. If not required remove the sleep or reduce the time for sleep to 5secs or so.

Gmail - Web Driver Automate

Here is the code I am trying to automate Gmail through Web Driver.
I found something weird. Whenever I am commenting out the line to find the Password (Driver.findElement(By.xpath(".//*[#id='Passwd']")).sendKeys("SRS");)
then Web Driver is successfully clicking on "Sign In" button
but when I un-comment the line
(Driver.findElement(By.xpath(".//*[#id='Passwd']")).sendKeys("SRS");)
then Web Driver is not able to click on Sign In button also and it gives the error message that Unable to find the Password Xpath however still its on Email id Screen only
Here is the attached screenshot
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Gmail {
public static void main(String[] args) {
// TODO Auto-generated method stub
WebDriver Driver = new FirefoxDriver();
Driver.get("https://www.google.com/gmail/about/");
Driver.findElement(By.xpath("html/body/nav/div/a[2]")).click();
Driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);
//Enter the Gmail ID
Driver.findElement(By.xpath(".//*[#id='Email']")).sendKeys("RK12#gmail.com");
Driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
//Click on Next Button
Driver.findElement(By.xpath(".//*[#id='next']")).click();
Driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
Driver.findElement(By.xpath(".//*[#id='Passwd']")).sendKeys("SRS");
//Driver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);
}
}
1. You are giving wrong email id, hence Google validated it and shown that the error message as "Sorry, Google doesn't recognize that email".
So, enter valid email id in order to proceed to password page.
2. Here, with the code in the question, gives ElementNotVisibleException, hence added ExpectedConditions.visibilityOfElementLocated to make sure that password field is loaded before sending the keys.
Updated code:
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Gmail {
public static void main(String[] args) {
WebDriver Driver = new FirefoxDriver();
Driver.get("https://www.google.com/gmail/about/");
Driver.findElement(By.xpath("html/body/nav/div/a[2]")).click();
Driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);
//Enter the Gmail ID
Driver.findElement(By.xpath(".//*[#id='Email']")).sendKeys("rbnaveen558#gmail.com");
Driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
//Click on Next Button
Driver.findElement(By.xpath(".//*[#id='next']")).click();
Driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
WebDriverWait wait = new WebDriverWait(Driver, 10);
WebElement pwd = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("Passwd")));
pwd.sendKeys("SRS");
//Driver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);
}
}
Please add "sign in" button also,i tested this.This is working fine.
driver.findElement(By.xpath(".//*[#id='Passwd']")).sendKeys("SRS");
driver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);
//click to sign in
driver.findElement(By.id("signIn")).click();

Selenium webdriver script not able to log in into magento Panel

I am trying to log in to Magento Admin panel via Selenium web Driver script but its not working .
It identifies login button and clicks on login button but it is not getting in to next page once log in successful.
userid : magadmin
Password : Lean5226
when you try it with iDE it is working
Website :
54.201.104.110/magento/env-ee/index.php/admin
Here is below script :
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver", "D:/ChromeDriver/chromedriver.exe");
WebDriver driver=new ChromeDriver();
System.out.println("Fire fox started");
String baseUrl = "http://54.201.104.110/";
driver.get(baseUrl + "/magento/env-ee/index.php/admin/");
driver.findElement(By.id("username")).clear();
driver.findElement(By.id("username")).sendKeys("magadmin");
driver.findElement(By.id("login")).clear();
driver.findElement(By.id("login")).sendKeys("Lean5226");
Thread.sleep(3000);
String att=driver.findElement(By.cssSelector("input.form-button")).getAttribute("value");
System.out.println(att);
WebDriverWait wait = new WebDriverWait(driver, 15);
driver.findElement(By.cssSelector("input.form-button")).click();
System.out.println("Waiting");
Thread.sleep(3000);
driver.close();
This post is a little old, but in the event that other people find it interesting you can do this using Magium with a fairly simple command. The following code is from one of the blog posts on logging in to the Magento admin IU
class LoginTest extends \Magium\Magento\AbstractMagentoTestCase
{
public function testLogin()
{
$this->getAction(\Magium\Magento\Actions\Admin\Login\Login::ACTION)->login();
}
}
There is some additional information on how to configure it on the blog post.

Click() on HtmlArea and nothing changes, why?

I'm trying my hand at HtmlUnity and have ran into trouble when I try to click an area with javaScript.
Here is the code:
import java.io.IOException;
import java.net.MalformedURLException;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlArea;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlMap;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
public class ToPost {
/**
* #param args
* #throws IOException
* #throws MalformedURLException
* #throws FailingHttpStatusCodeException
*/
public static void main(String[] args) throws FailingHttpStatusCodeException, MalformedURLException, IOException {
HtmlPage page;
final WebClient webClient = new WebClient();
page = webClient.getPage("http://www.hidrografico.pt/previsao-mares.php");
System.out.println(page.getTitleText());
HtmlPage pagePortoLeixoes = setPort(page, "362,64,440,90");
System.out.println("Are they the same? "+page.asXml().equals(pagePortoLeixoes.asXml()));
}
private static HtmlPage setPort(HtmlPage page, String coordinatesPort) throws IOException {
HtmlMap map = page.getHtmlElementById("FPMap1");
Iterable<HtmlElement> childAreas = map.getChildElements();
HtmlArea tempArea;
for (HtmlElement htmlElement : childAreas) {
tempArea = (HtmlArea) htmlElement;
if(tempArea.getCoordsAttribute().equals(coordinatesPort)){
System.out.println("Found Leixoes! --> "+ tempArea.asXml());
return tempArea.click();
}
}
return null;
}
}
I don't show it here but I double-check in my full code that I'm really not in the page I want.
What is happening? Why doesn't the click work?
HtmlUnit .click() often works poorly when "complex" javascript is involved.
http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/html/HtmlElement.html#click()
Simulates clicking on this element, returning the page in the window that has the focus after the element has been clicked. Note that the returned page may or may not be the same as the original page, depending on the type of element being clicked, the presence of JavaScript action listeners, etc
In this case, you'll have to find another way to catch the data.
What i did see is that using .rss links, it gives you direct links to cities ...
eg : http://www.hidrografico.pt/previsao-mares-aveiro.php
Another way would have been to forge a POST request (check for exemple with Httpfox which requests are done when you're stuck getting a page)

ERROR: Element Not Found works well in Selenium IDE but not in Selenium RC. getting error

this is my script. while clicking a link using its xpath not working & throws an error 'ERROR element not found' but works well in Selenium IDE.
import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.regex.Pattern;
public class testGoogle extends SeleneseTestCase {
#Before
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://www.google.co.in/");
selenium.start();
selenium.windowFocus();
selenium.windowMaximize();
}
#Test
public void testUntitled() throws Exception {
selenium.open("http://www.google.co.in/");
selenium.waitForPageToLoad("30000");
assertEquals("Google", selenium.getTitle());
selenium.click("name=q");
selenium.type("name=q", "Software Testing");
selenium.click("name=btnK");
selenium.click("//html/body/div[4]/div/div/div[4]/div[3]/div[2]/div/div[2]/div/ol/li[2]/div/h3/a"); // ERROR: Element Not Found
selenium.waitForPageToLoad("30000");
}
#After
public void tearDown() throws Exception {
selenium.stop();
}
}
You can detect link as selenium.click("link=xyz") instead of xpath
The script is absolutely right. But the problem is that it is running very fast. When you start the script all the elements are not fully loaded. So add
selenium.setSpeed("1000");
as the very first line in function testUntitled(). Your script will run fine.
Cheers,
Amit Shakya
Just add "xpath=" before the path like this
xpath=/html/body/div[4]/div/div/div[4]/div[3]/div[2]/div/div[2]/div/ol/li[2]/div/h3/a
it will work faced this problem earlier..
I was also facing the issue - "Element not found" in Selenium RC.
Using selenium.setSpeed("1000") worked.

Resources