Display results as :

Rechercher Advanced Search

Latest topics
» Selenium WebDriver Integration
Today at 1:06 pm by azharuddin

» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce


i faced a problem during running the code in selenium rc please solve it

View previous topic View next topic Go down

i faced a problem during running the code in selenium rc please solve it

Post by venkatkoritala on Thu Dec 13, 2012 3:59 pm

if i run this code only one time the prestashop app store item added into cart and error occured like
Exception in thread "main" java.lang.IllegalMonitorStateException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(
at nonRep.testUntitled(
at nonRep.main(
please solve the prob

import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.SeleneseTestCase;

public class nonRep extends SeleneseTestCase {

public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*firefox", "");

public void testUntitled() throws Exception {"http://localhost/prestashop/index.php");"css=a[title="Now that you can buy movies from the iTunes Store and sync them to your iPod, the whole world is your theater."]");

String text=selenium.getText("//*[@id='center_column']/div[2]");
String[] temp=text.split(" ");
int n2=Integer.parseInt(temp[2]);
Number n=(selenium.getXpathCount("//input[starts-with(@id,'comparator_item')]"));


int i;
for (i=1;i<=n2;i++)
String s="//*[@id='product_list']/li["+i+"]/div[2]/a/img";
if(selenium.isElementPresent("//*[@id='add_to_cart']/input")) //finds the button
selenium.focus("//*[@id='add_to_cart']/input"); // focuses the button
selenium.highlight("//*[@id='add_to_cart']/input"); //highlights the button"//*[@id='add_to_cart']/input"); //doesn't click the button???



public void tearDown() throws Exception {

public static void main(String[]x)throws Exception

nonRep r=new nonRep();



Posts : 6
Join date : 2012-11-22

Back to top Go down

View previous topic View next topic Back to top

Permissions in this forum:
You cannot reply to topics in this forum