Selenium testing with "360 Safe Browser"

367 views
Skip to first unread message

Sasi

unread,
May 31, 2011, 2:21:40 PM5/31/11
to seleniu...@googlegroups.com
I need to test a Chinese site and am trying to get Selenium to work with "360 Safe Browser", which is a popular browser in China. Following is my test code and it doesn't work.

public class NewTest extends SeleneseTestCase {

      public void setUp() throws Exception {
        setUp("http://www.google.com/", "*custom C:\\Program Files\\360\\360se3\\360se.exe");
      }

      public void testNew() throws Exception {
           selenium.open("/");
           selenium.type("q", "selenium rc");
           selenium.click("btnG");
           selenium.waitForPageToLoad("30000");
           assertTrue(selenium.isTextPresent("selenium rc"));
     }
}

If I use the "*custom" parameter with the path to IE, the testcase passes.

Can someone who has tried Selenium with 360 Safe browser shed some light on how to get it working?

-- 
Regards,

Sasi

Sasi kumar

unread,
Jun 1, 2011, 5:00:14 AM6/1/11
to Selenium Users
hi you first run in interactive mode and check if browser is
supported?

check selenium docs

Sasi Kutti

unread,
May 31, 2011, 1:55:07 PM5/31/11
to seleniu...@googlegroups.com

Sasi

unread,
Jun 15, 2011, 4:37:57 PM6/15/11
to Selenium Users
Sasi kumar,

Thanks for looking into this.

I tested in interactive mode as you suggested and it works fine.
Following are the commands I ran.

cmd=getNewBrowserSession&1=*custom C:\Program Files
\360\360se3\360se.exe&2=http://www.google.com
cmd=open&1=http://www.google.com
cmd=type&1=q&2=laptop
cmd=click&1=btnG

But, the NewTest class code doesn't work. Any help would be
appreciated.

Regards,

Sasi

Sasi kumar

unread,
Jun 16, 2011, 1:09:37 AM6/16/11
to Selenium Users
have you set the proxy to localhost ,8080 in browser has they
suggested. iam not sure about browser you are talking about ,but that
proxy is for using "* custom".

Jayakumar C

unread,
Jun 16, 2011, 3:43:11 AM6/16/11
to seleniu...@googlegroups.com
@ Sasi Kutti,

For *custom mode, browser must be manually configured to use the Selenium Server as a proxy.(i.e) localhost:4444
http://seleniumhq.org/docs/05_selenium_rc.html#running-tests-with-different-browser-configurations


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.




--
Jayakumar

Sasi

unread,
Jun 16, 2011, 6:00:43 PM6/16/11
to Selenium Users
The "360 Safe" browser just uses the connection configuration of the
machine. In my Windows box, I did set "Control Panel->Internet Options-
>Connections->LAN Settings->Proxy Server" to use localhost:4444 as the
proxy server. I tested that configuration by trying to open www.google.com
without running "java -jar selenium-server.jar" - in which case I got
the Page not found error. Once I start the selenium-server.jar, I am
able to open sites, but my test program doesn't work.

In case you'd like to try that browser out, you can download it at
http://down.360safe.com/se/360se_3.7.exe

Sasi

On Jun 16, 12:43 am, Jayakumar C <jayakumaree...@gmail.com> wrote:
> @ Sasi Kutti,
>
> For *custom mode, browser must be manually configured to use the Selenium
> Server as a proxy.(i.e) localhost:4444
> <http://seleniumhq.org/docs/05_selenium_rc.html#supporting-additional-...>http://seleniumhq.org/docs/05_selenium_rc.html#running-tests-with-dif...

Jayakumar C

unread,
Jun 17, 2011, 3:21:56 AM6/17/11
to seleniu...@googlegroups.com
Got "*custom" mode worked once after disabling the 360Safe's pop-up  blocker.

Followed "Second, the permanent way:" mentioned here to disable the pop-up blocker.

Finally, this python sample is working fine in my local,

from selenium import selenium
import time

s= selenium("localhost", 4444, "*custom C:\\Users\\jayakumar\\AppData\\Roaming\\360se\\bin\\360se.exe", "http://www.google.co.in/")
s.start()
s.window_focus()
s.window_maximize()
s.open("http://www.google.co.in/")
s.type('q',"selenium")
time.sleep(2)
print "Done..."
s.close()
s.stop()

Hope this helps you...

PS: Am using windows7, so the path to the binary may differ for you.

Sasi

unread,
Jun 22, 2011, 3:55:20 PM6/22/11
to Selenium Users
Terrific. It works after disabling the pop-up blocker!

Appreciate your help.

Did I miss some instruction in Selenium docs about disabling pop-ups?

Regards,

Sasi

On Jun 17, 12:21 am, Jayakumar C <jayakumaree...@gmail.com> wrote:
> Got "*custom" mode worked once after disabling the 360Safe's pop-up
> blocker.
>
> Followed "*Second, the permanent way:*" mentioned
> here<http://translate.google.co.in/translate?hl=en&sl=zh-CN&u=http://www.c...>to
> disable the pop-up blocker.
>
> Finally, this python sample is working fine in my local,
>
> from selenium import selenium
> import time
>
> s= selenium("localhost", 4444, "*custom
> C:\\Users\\jayakumar\\AppData\\Roaming\\360se\\bin\\360se.exe", "http://www.google.co.in/")
> s.start()
> s.window_focus()
> s.window_maximize()
> s.open("http://www.google.co.in/")
> s.type('q',"selenium")
> time.sleep(2)
> print "Done..."
> s.close()
> s.stop()
>
> Hope this helps you...
>
> PS: Am using windows7, so the path to the binary may differ for you.
>

Sasi

unread,
Jun 22, 2011, 5:27:14 PM6/22/11
to Selenium Users
Now, I tried to get similar code to work with www.walmart.com.
Unfortunately, it doesn't work. I get timeout in the
selenium.open("/") call. Here is my code. The same code works with
*iexplore option.

public class NewTest extends SeleneseTestCase {

public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*custom C:\
\Program Files\\360\\360se3\\360se.exe", "http://www.walmart.com/");
selenium.start();
selenium.setTimeout("120000");
}

public void testNew() throws Exception {
selenium.open("/");
selenium.type("searchText", "gps");
selenium.click("search_btn");
selenium.waitForPageToLoad("120000");
assertTrue(selenium.isTextPresent("gps"));
Reply all
Reply to author
Forward
0 new messages