Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
lif3r0cks
Posts : 2
Join date : 2011-03-07

How to use user extensions using Selenium RC Empty How to use user extensions using Selenium RC

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 .....
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

How to use user extensions using Selenium RC Empty Re: How to use user extensions using Selenium RC

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.
avatar
lif3r0cks
Posts : 2
Join date : 2011-03-07

How to use user extensions using Selenium RC Empty Re: How to use user extensions using Selenium RC

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 .....
avatar
nobel
Active particpant
Active particpant
Posts : 18
Join date : 2011-03-25
Age : 36

How to use user extensions using Selenium RC Empty How to use User extensions using Selenium RC.

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
avatar
nobel
Active particpant
Active particpant
Posts : 18
Join date : 2011-03-25
Age : 36

How to use user extensions using Selenium RC Empty How to use User extensions using Selenium RC.

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
avatar
danielclark
Posts : 1
Join date : 2011-04-30

How to use user extensions using Selenium RC Empty webdesign

Sat Apr 30, 2011 1:49 pm
ya its a selenium forum
========
http://www.webicon.co.in
Sponsored content

How to use user extensions using Selenium RC Empty Re: How to use user extensions using Selenium RC

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