Selenium with VPN connection?

1,961 views
Skip to first unread message

Swami

unread,
Feb 16, 2009, 12:02:03 AM2/16/09
to selenium-users...@googlegroups.com
Hi,

Regardig the Selenium RC I have few questions. One of them is regarding the VPN connection and SRC.

*Questions #1:*
I have a test case written for my application which needs a VPN connection when accessed out of office network.
I executed the test case in Selenium RC by the below command.
\\ java -jar selenium-server.jar -port 4545 -htmlsuite "*iehta" http://www.ebay.com "C:\Selenium\Tests\login_suite.html" C:\Selenium\result.html (or)
\\ java -jar selenium-server.jar -port 4545 -htmlsuite "*chrome" http://www.ebay.com "C:\Selenium\Tests\login_suite.html" C:\Selenium\result.html


While for firefox it opens the application in the testrunner window instead of the window at the lower part and in case of IE it reports a "Permission Denied" error. This test case executes successfully in IDE with and without VPN connection. However i'm yet to check the RC execution without vpn connection. I'll do it sometime tomorrow.
Is there any known bug in RC for the execution with VPN connection.


Here is my other question,
*Questions #2:*
As i was stuck with above problem i recorded a simple testcase with google.com,

open|wwww.google.com\\ type|q|my first test case in selenium\\ clickandWait|btnG\\ VerifyTitle|my first test case in selenium

Executed with IDE gives a pass result.
While executing it in RC using the command,
\\ java -jar selenium-server.jar -port 4545 -htmlsuite "*chrome" http://www.ebay.com "C:\Selenium\Tests\ord_ts.html" "C:\Selenium\result_ord.html"

The test always report a FAIL, it opens some link named as
*http://pages.ebay.com/selenium-server/tests/www.google.com* and tries to execute the test case.

Just to debug about the issue i changed the command as:
java -jar selenium-server.jar -port 4545 -htmlsuite "*chrome" http://www.google.com "C:\Selenium\Tests\ord_ts.html" "C:\Selenium\result_ord.html"

The above command gives a PASS to the execution.

Could somebody explain the reasons for the above.
Any help on this is highly appreciated.

Thanks,
Swami

shital.mukhedkar

unread,
Feb 16, 2009, 6:25:57 AM2/16/09
to selenium-users...@googlegroups.com
Hi,
For the second question, I would say:
On the command prompt the you wrote the URL as "www.ebay.com" where as in the test you wrote the command open "www.google.com"
When the browser launches, it opens the ebay site & tries to open the www.google.com link, but obviously it will not get it.
Its contradiction between the URL given on command prompt & the URLmentioned in the test.
That's why the test fails.

Swami

unread,
Feb 16, 2009, 9:20:17 AM2/16/09
to selenium-users...@googlegroups.com
Hi,

Thanks for your reply.
I used "ebay.com" just a filler for the -html suite options.
Since I open google.com in the test case i did not use it here.

So does this mean that we should always use the weblink on which we are going to work?
Does this apply for both http and https links too?

Thanks,
Swami

Swami

unread,
Feb 16, 2009, 5:23:20 PM2/16/09
to selenium-users...@googlegroups.com
Mary Ann,

Today after getting fed up i totally deleted all the selenium files and freshly loaded them.
After that i tried to execute the part in Question#2.
It is working fine.

Thanks for all the clarification.
I'm currently using the RC beta1.0-beta 2.

I do have one more question, I'm not sure whether i could post it here or in the previous post itself.
Let me do it here. After the removal and including the new files as stated earlier,

I tried to execute the test case i recorded for my application.
Now the IE does not report any permission Denied message but instead both IE and firefox opens the application in the test runner window itself.
In the sense the test runner page gets moved to my application.
When i tried to pause the script execution before it starts to execute, then i clicked on the step button. Somewhere in between the IE to open my application got closed. it reported a failure like below.


C:\Selenium\Server\selenium-server-1.0-beta-2>java -jar selenium-server.jar -por\\ t 4444 -htmlsuite "*iehta" http://www.ebay.com "C:\Selenium\Tests\login_suite.ht\\ ml" C:\Selenium\result.html\\ 16:18:40.419 INFO - Java: Sun Microsystems Inc. 11.2-b01\\ 16:18:40.419 INFO - OS: Windows XP 5.1 x86\\ 16:18:40.419 INFO - v1.0-beta-2 [2571], with Core v1.0-beta-2 [2330]\\ 16:18:40.498 INFO - Version Jetty/5.1.x\\ 16:18:40.498 INFO - Started HttpContext[/selenium-server/driver,/selenium-server\\ /driver]\\ 16:18:40.498 INFO - Started HttpContext[/selenium-server,/selenium-server]\\ 16:18:40.498 INFO - Started HttpContext[/,/]\\ 16:18:40.513 INFO - Started SocketListener on 0.0.0.0:4444\\ 16:18:40.513 INFO - Started org.mortbay.jetty.Server@201f9\\ 16:18:41.123 INFO - Launching Embedded Internet Explorer...\\ 16:18:42.138 INFO - Launching Internet Explorer HTA...\\ 16:18:45.560 INFO - Checking Resource aliases\\ 16:18:54.654 INFO - Checking Resource aliases\\ 16:18:54.654 INFO - Received posted results\\ 16:18:55.154 WARN - Embedded iexplore seems to have ended on its own (did we kil\\ l the real browser???)\\ Tests failed, see result file for details: C:\Selenium\result.html\\ 16:18:55.341 INFO - Shutting down...\\ 16:18:55.341 INFO - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,l\\ ocalport=4444]


The details in the Test result file was:


Test suite resultsh1. Test suite results
| result: | failed |
| totalTime: | 8 |
| numTestTotal: | 1 |
| numTestPasses: | 0 |
| numTestFailures: | 1 |
| numCommandPasses: | 0 |
| numCommandFailures: | 0 |
| numCommandErrors: | 1 |
| Selenium Version: | undefined |
| Selenium Revision: | undefined |
| | *Test Suite* |
| [Clinician_login|#testresult0] |
| |
| [Clinician_login.html]\\ | %1,3% Clinician_login |
| open | https://cli-qa.xxxx.net/jsp/portal/login.jsp | Current window or frame is closed! |
| waitForText | User | |
| type | User | sxxxxx |
| type | Pwd | xxxxxxx |
| clickAndWait | loginBtn | |
| select | activeHDNBusiness | label=Dekalb Medical  Center (Parent) |
| clickAndWait | actionCommand | |
| selectFrame | portal | |
| clickAndWait | link=Orders | |
| clickAndWait | link=New Order | |
| selectFrame | relative=up | |
| selectFrame | body | |
| verifyElementPresent | resetBtn | |
| click | resetBtn | |
| verifyTextNotPresent | Do Step 1 above to search for a patient even if you believe this to be a new  patient. | x |
| verifyValue | searchLN | |
| verifyValue | searchSSN | |
| verifyValue | searchaccountId | |
| type | searchaccountId | jr1002 |
| clickAndWait | search | |
| |
info: Starting test /selenium-server/tests/Clinician_login.html
info: Executing: |open | https://cli-qa.xxxx.net/jsp/portal/login.jsp |  |
info: Executing: |open | https://cli-qa.xxxx.net/jsp/portal/login.jsp |  |
error: modifyWindow: Window was closed!
error: Current window or frame is closed!
warn: currentTest.recordFailure: Current window or frame is closed!
\\ \\ I'm  not sure how the winodws got closed by themselves.\\ \\ Regards,\\ Swami

Reply all
Reply to author
Forward
0 new messages