Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

How to use user extensions using Selenium RC

View previous topic View next topic Go down

How to use user extensions using Selenium RC

Post by lif3r0cks on Mon Mar 07, 2011 7:11 pm

Hi ,

I was trying to use the user-extension provided by our Dev team for automating SmartGWT .
Here is what i did.

To add user-extension.js to the selenium-sever.jar.

1 .Opened selenium-server.jar it using winzip
2. Deleted the existing user-extensions.js
3. Added this user-extensions.js provided by dev team to the selenium-server.jar using the “Add” button on the top bar of Winzip
4. Close Winzip

Later I added this server.jar to my projects lib file and removed the original one.

Now i did the following to my setup method.

public static void setUp() throws Exception
{

proc = new HttpCommandProcessor("localhost",5555,"*chrome","my test url");
selenium = new DefaultSelenium(proc);
server.start();
selenium.start();
selenium.windowMaximize();
selenium.setSpeed("3000");
}


I dont know what to do next ..... Sad
please help .....

lif3r0cks

Posts : 2
Join date : 2011-03-07

Back to top Go down

Re: How to use user extensions using Selenium RC

Post by Adviser on Mon Mar 14, 2011 8:09 pm

hi,

you need to start you selenium server with user extension via command to use the use extension.

What that user extension contains?????????

if it contain some custom function, just call it by name. If you define OR object description for SMARTgwt component use the name defined in that to perform operation on that.

best of luck.

Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

Re: How to use user extensions using Selenium RC

Post by lif3r0cks on Wed Mar 16, 2011 12:17 pm

Hey ...
It worked ...
These user extension were majorly to recognize the dynamic objects that were created on the fly in the application

Thanks a lot .....

lif3r0cks

Posts : 2
Join date : 2011-03-07

Back to top Go down

How to use User extensions using Selenium RC.

Post by nobel on Mon Apr 11, 2011 12:41 pm

Hi lif3r0cks

You have used user extensions using Selenium RC.

Could you tell me how to do this? because i am trying this for past two
weeks.
From where to take user-extensions.js file? I have taken user-extensions.js from smartgwt2.4 /selenium/user-extensions.js and i placed the file where selenium-server.jar was located.

I ran as follows:
d:> java -jar selenium-server.jar -userExtensions user-extensions.js

but then i am getting the below error:
com.thoughtworks.selenium.SeleniumException: ERROR: Element scLocator=//IButton[ID="isc_IButton_0"]/ not found

My Testcase code is as follows: Please check this code and tell me whether i need to change/add anything.

Code:

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.regex.Pattern;

public class TestCase1 extends SeleneseTestCase {
    @Before
    public void setUp() throws Exception {
        selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://127.0.0.1:8888/");
        selenium.start();
    }

    @Test
    public void testUntitled() throws Exception {
        selenium.open("/index.html?gwt.codesvr=127.0.0.1:9997#form_validation_type");
        selenium.click("scLocator=//IButton[ID="isc_IButton_0"]/");
        selenium.type("scLocator=//DynamicForm[ID="isc_DynamicForm_2"]/item[name=intField||title=Integer||value=ty||index=0||Class=TextItem]/element", "ty");
    }

    @After
    public void tearDown() throws Exception {
        selenium.stop();
    }
}

Please reply me soon. It's urgent. I am not using custom method. I am using smartgwt. If possible, welcome to share your code. I have generated this testcase from Showcase examples of smartgwt.

Thanking You..
nobel

nobel
Active particpant
Active particpant

Posts : 18
Join date : 2011-03-25
Age : 28

Back to top Go down

How to use User extensions using Selenium RC.

Post by nobel on Mon Apr 11, 2011 1:04 pm

Hi

Could you tell me
how to do this? because i am trying this for past two
weeks.
From
where to take user-extensions.js file? I have taken user-extensions.js
from smartgwt2.4 /selenium/user-extensions.js and i placed the file
where selenium-server.jar was located.

I ran as follows:
d:>
java -jar selenium-server.jar -userExtensions user-extensions.js

but
then i am getting the below error:
com.thoughtworks.selenium.SeleniumException:
ERROR: Element scLocator=//IButton[ID="isc_IButton_0"]/ not found


My
Testcase code is as follows: Please check this code and tell me whether
i need to change/add anything.

Code:

import
 com.thoughtworks.selenium.*;
import org.junit.After;
import
org.junit.Before;
import org.junit.Test;
import
java.util.regex.Pattern;

public class TestCase1 extends
SeleneseTestCase {
    @Before
    public void setUp() throws
Exception {
        selenium = new DefaultSelenium("localhost", 4444,
 "*chrome", "http://127.0.0.1:8888/");
        selenium.start();
 
  }

    @Test
    public void testUntitled() throws Exception
 {
       
selenium.open("/index.html?gwt.codesvr=127.0.0.1:9997#form_validation_type");
 
      selenium.click("scLocator=//IButton[ID="isc_IButton_0"]/");
 
   
selenium.type("scLocator=//DynamicForm[ID="isc_DynamicForm_2"]/item[name=intField||title=Integer||value=ty||index=0||Class=TextItem]/element",
 "ty");
    }

    @After
    public void tearDown() throws
Exception {
        selenium.stop();
    }
}

Please
reply me soon. It's urgent. I am not using custom method. I am using
smartgwt. If possible, welcome to share your code. I have generated this
testcase from Showcase examples of smartgwt.

Thanking You..
nobel

nobel
Active particpant
Active particpant

Posts : 18
Join date : 2011-03-25
Age : 28

Back to top Go down

webdesign

Post by danielclark on Sat Apr 30, 2011 1:49 pm

ya its a selenium forum
========
http://www.webicon.co.in

danielclark

Posts : 1
Join date : 2011-04-30

Back to top Go down

Re: How to use user extensions using Selenium RC

Post by Sponsored content Today at 6:33 pm


Sponsored content


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