- lif3r0cks
- Posts : 2
Join date : 2011-03-07
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 .....
please help .....
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 .....
please help .....
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.
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.
- lif3r0cks
- Posts : 2
Join date : 2011-03-07
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 .....
It worked ...
These user extension were majorly to recognize the dynamic objects that were created on the fly in the application
Thanks a lot .....
- nobelActive particpant
- Posts : 18
Join date : 2011-03-25
Age : 36
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.
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
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
- nobelActive particpant
- Posts : 18
Join date : 2011-03-25
Age : 36
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.
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
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
Permissions in this forum:
You cannot reply to topics in this forum