While implementing Selenium RC I’ve come across one issue which is blocking 
me in automating more than 10 clients.Would really appreciate your help.

  *My Requirement is:*

* *

1.       go the site ‘missselfridge.com’ 

2.       In that go to the UK site(there is a link to select country on the 
top)

3.       Now select the category ‘Dresses’

4.       Select any product from the list.

5.       Add to the Bag

 

*On the product page its throwing exception.*

 

*Below is the code I’ve used using Junit framework:*

 

package com.testing.selenium.javatestcase;

 

import com.thoughtworks.selenium.*;

import org.junit.After;

import org.junit.Before;

import org.junit.Test;

import java.util.regex.Pattern;

 

public class Test1 extends SeleneseTestBase{

                @Before

                public void setUp() throws Exception {

                                selenium = new DefaultSelenium("localhost", 
4444, "*chrome", "http://www.missselfridge.com";);

                                selenium.start();

                }

 

                @Test

                public void testMissSelfRidges() throws Exception {

                                selenium.open("/");

                                selenium.windowMaximize();

                                //code to select country

                                
selenium.click("//*[@id='rs_country_link']");  

                                Thread.sleep(3000);

                                
selenium.select("//select[@id='rs_region_selector']","label="+selenium.getText("//select[@id='rs_region_selector']/option[1]"));

                                selenium.click("//*[@id='rs_btn_go_1']");

selenium.click("//*[@id='nav_catalog_menu']/li[2]/ul/li[1]/a");  //select 
category dresses

*synchronized*(selenium){

                                                selenium.wait(3000);

                                }

selenium.click("//div[@id='wrapper_page_content']/div[4]/div[1]/ul/li[1]/a[1]");
 
//select product

 

selenium.waitForPageToLoad("30000");

selenium.click("//*[@id='btn_add_2_shop_cart']"); //click to add to bag 
button

selenium.waitForPageToLoad("30000");

                }

@After

public void tearDown() throws Exception {

                //selenium.stop();

}

}

 

*Exception :*

* *

com.thoughtworks.selenium.SeleniumException: Permission denied for <
http://www.missselfridge.com> to get property Location.href

                at 
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:112)

                at 
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:106)

                at 
com.thoughtworks.selenium.DefaultSelenium.waitForPageToLoad(DefaultSelenium.java:678)

                at 
com.peerius.selenium.javatestcase.TestMissSelfRidges.testMissSelfRidges(TestMissSelfRidges.java:47)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)

                at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:601)

                at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

                at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

                at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

                at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

                at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)

                at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)

                at 
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)

                at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)

                at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)

                at 
org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

                at 
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

                at 
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

                at 
org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

                at 
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

                at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

                at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

                at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

                at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

                at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

                at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

                at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

 


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/mS9aqnmkoC0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to