Display results as :

Rechercher Advanced Search

Latest topics
» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

» Selenium IDE Verify different Maps (Hybridview, Mapview etc.)
Fri Nov 25, 2016 9:56 pm by DJ87


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

- Similar topics

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