Running Tests in Parallel on Safari Browser

1,310 views
Skip to first unread message

sachin

unread,
Nov 30, 2012, 12:59:52 PM11/30/12
to seleniu...@googlegroups.com

Hi All,

I would like to know if it is possible to run tests in parallel on Safari browser using Selenium version 2.26.0 ?

Regards,
Sachin

sachin

unread,
Nov 30, 2012, 11:46:32 PM11/30/12
to seleniu...@googlegroups.com
HI All,

Could you please tell me if this is possible or not?


Krishnan Mahadevan

unread,
Dec 2, 2012, 7:13:50 AM12/2/12
to seleniu...@googlegroups.com
Have you given this a try? What are the issues you have faced ? IMO a trial of this should answer your own question no?


On Saturday, December 1, 2012, sachin wrote:
HI All,

Could you please tell me if this is possible or not?


--
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.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/tQanBlUJ-EQJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

SACHIN V

unread,
Dec 2, 2012, 10:52:19 AM12/2/12
to seleniu...@googlegroups.com
Hi Krishnan,
I have given it a try by running my tests in parallel. It opens the browser for the first test but it is unable to open the browser for the other tests. After sometime, it throws UnReachableBrowserException with the messsage that the URL of RemoteWebDriver is invalid.


Thanks & Regards,

V Sachin

Alex

unread,
Dec 3, 2012, 5:57:27 AM12/3/12
to seleniu...@googlegroups.com
what language and environment are you using? in visual studio i managed to get several chrome/ff/ie tests to run in paralel as long as the required elements werent covered by the other windows.


On Sunday, December 2, 2012 5:52:19 PM UTC+2, sachin wrote:
Hi Krishnan,
I have given it a try by running my tests in parallel. It opens the browser for the first test but it is unable to open the browser for the other tests. After sometime, it throws UnReachableBrowserException with the messsage that the URL of RemoteWebDriver is invalid.


On Sun, Dec 2, 2012 at 5:43 PM, Krishnan Mahadevan <krishnan.ma...@gmail.com> wrote:
Have you given this a try? What are the issues you have faced ? IMO a trial of this should answer your own question no?


On Saturday, December 1, 2012, sachin wrote:
HI All,

Could you please tell me if this is possible or not?


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/tQanBlUJ-EQJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
--
Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

--
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 https://groups.google.com/groups/opt_out.
 
 

sachin

unread,
Dec 3, 2012, 9:54:11 AM12/3/12
to seleniu...@googlegroups.com
Hi Alex,

I am using Java on a Windows platform. I have been able to tests in parallel on all the browsers except Safari and Opera(didn't give a try with Opera). The Safari browser gets opened but the URL is not loaded from the 2nd thread onwards.


David

unread,
Dec 3, 2012, 3:57:36 PM12/3/12
to seleniu...@googlegroups.com
It would be interesting to see if you encounter the same problem for Safari on Mac. Could be Safari platform issue. I'll have to double-check but think we currently do or plan to run multiple Safari tests on Mac.

Alex

unread,
Dec 4, 2012, 4:36:13 AM12/4/12
to seleniu...@googlegroups.com
are you sure it isn't a problem with the driver itself? i have not gotten the safari webdriver to work in visual studio but the closest i got was having the browser open but it never navigated to the instructed url due to communication errors which sound very similar to what you said happens to you (if that is indeed the case it isn't related to the tests being run in parallel.

David

unread,
Dec 4, 2012, 3:23:38 PM12/4/12
to seleniu...@googlegroups.com
I can't say if there are language binding issues, but driver works fine (not including parallel testing part) under Java. I believe it should work fine for all other bindings via remote web driver. Java has the local binding option, not sure about other languages.

If it's a driver (extension) build problem, you can get my prebuilt one here (look under compiled folder): https://docs.google.com/folder/d/0B5KGduKl6s6-ZGpPZlA0Rm03Nms/edit

I know v2.25 and v2.26 work because I've tested them briefly. I'm presently using/on v2.25.

I think it sounds like you got a bad extension build.

sachin

unread,
Dec 5, 2012, 11:47:52 AM12/5/12
to seleniu...@googlegroups.com
Hi David,

It isn't the problem with extension, I downloaded the extensions that you have provided, but the output is same. I'm still unable to execute tests in parallel on Windows platform.


Alex,

I'm successfully running my tests on Safari browser, I don't have any kind of problem running in sequential order. Only when it comes to parallel execution, I'm facing this problem.

Alex

unread,
Dec 6, 2012, 3:40:58 AM12/6/12
to seleniu...@googlegroups.com
well i know the safari web driver has a completly different way of comunicating with the safari browser that the other webdrivers. Maybe whatever way of comunicating it uses it can only have one at a time?

sachin

unread,
Dec 7, 2012, 8:59:02 AM12/7/12
to seleniu...@googlegroups.com

Yes Alex, May be you are right..
I will just explore and will post in this thread If I get any information..

David

unread,
Dec 7, 2012, 4:56:17 PM12/7/12
to seleniu...@googlegroups.com
Well, I did a quick test and this is what I found and confirmed my assumptions:

* you can run multiple SafariDriver instances on Mac OS X (tested on 10.7 Lion with Safari 5 with SafariDriver v2.25.0 running local SafariDriver() instance in Java). The instance windows will act independently of each other. I just did a quick test and opened drivers to go to different sites.

* SafariDriver on Windows does not allow multiple SafariDriver instances. You can launch multiple instances successfully but it seems they all just drive the first instance. I did same test I did on Mac for this.

So if you want multiple Safari browser sessions, you may have to go with Mac. Seriously you need to use a Mac to really verify Safari compatibility anyways since there are still differences between Windows and Mac Safari, and that few Safari users are actually on Windows.

One other thing to try, which I didn't test for, is to use Selenium Grid, even with hub and node all on local machine. If you start up 2 Safari nodes on different ports connecting to same hub, maybe that might actually work. Or instead of Grid, just fire up 2 Selenium servers on different ports on local machine so that you can connect to them via remote web driver. Then using remote driver, specify you want Safari. 

But one thing is for sure, using local SafariDriver(), in Java at least, guess same for .NET, you can't run in parallel on Windows.
Message has been deleted

sachin

unread,
Dec 11, 2012, 8:07:15 AM12/11/12
to seleniu...@googlegroups.com
Yes David, You are absolutely right. I also performed the same test on Windows and MAC. The same piece of code for parallel execution works fine of MAC but does not work Windows.
 
I even tried out using Selenium Grid by creating two different nodes for Safari connected to the same hub, even then it does not allow parallel execution.

Freddy Vega

unread,
Dec 11, 2012, 1:24:56 PM12/11/12
to seleniu...@googlegroups.com
Thank god is only Safari! :)

On a serious note: you should really file a bug IF this is truly an issue (as it seems to be based on two independent verifications)

David

unread,
Dec 11, 2012, 10:44:08 PM12/11/12
to seleniu...@googlegroups.com
I wonder whether this would be treated as a bug in the driver/extension or a bug in Safari browser itself.

From my point of view, though I'm not involved in the development of the driver extension, I assume the SafariDriver extension is generally agnostic across platforms, w/ no OS specific code handling, which I assume is same for Firefox and Chrome, because they are all (currently at least) in effect, browser extensions which run on any/most OS platforms.

And the SafariDriver client binding is just a client interface that shouldn't matter for OS.

Therefore, one should deduce this to be an Apple issue with their Safari browser implementation between Windows and Mac. Apparently, they give better functionality and focus to the Mac. I've found in testing at my organization that there's a Windows Safari (4 or 5, I forget) bug on how it treats data from HTML5 file upload whereas no same issue on Mac Safari.

Knowing how Apple is with Selenium, one can just treat this as a limitation until Apple ever fixes it.

But anyone feel free to file a Selenium issue to track this and for the developers to look into it regardless.

Alex

unread,
Dec 12, 2012, 3:44:23 AM12/12/12
to seleniu...@googlegroups.com
you do know they dropped all support for safari on windows dont you? they even took down the download link.

Jason Leyba

unread,
Dec 12, 2012, 1:36:03 PM12/12/12
to seleniu...@googlegroups.com
You should be able to run in parallel on OSX, but not on Windows.  When we launch Safari from the command line on a Mac we get a new Safari process that can be controlled independently of any others.  On Windows, launching Safari from the command line multiple times just results in opening additional windows for the existing process.

-- Jason

David

unread,
Dec 12, 2012, 1:52:31 PM12/12/12
to seleniu...@googlegroups.com
Thanks Jason for the developer confirmation and insight to the differences.

Thanks Alex for pointing out the Safari Windows dropped support. I guess that may be good (and bad) in forcing users/developers to go with Mac going forward for Safari Selenium testing.

Nagarjuna Reddy K

unread,
Oct 4, 2018, 8:54:17 AM10/4/18
to Selenium Users
Can you share code or give me some ideas for launching multiple safari instances in MAC .I have tried nut ,not working 

Vikram

unread,
Oct 11, 2018, 4:43:26 AM10/11/18
to Selenium Users
Hi,

I won't recommend launching multiple safari browser on same machine to run in parallel. As real world scenario user won't and can't do this. With automation we like to match real world user scenarios

Instead you can go with docker safari container.


Regards,
Vikram

Nagarjuna Reddy K

unread,
Oct 11, 2018, 6:10:53 AM10/11/18
to seleniu...@googlegroups.com
Thaks Vikram for  reponse to my post.Is it possible to launch multiple safari browsers in single machine for doing parallel testing ?

Thanks,
Nagarjuna

On Thu, Oct 11, 2018 at 2:49 PM Vikram <vikra...@gmail.com> wrote:
Boxbe This message is eligible for Automatic Cleanup! (vikra...@gmail.com) Add cleanup rule | More info
Hi,

I won't recommend launching multiple safari browser on same machine to run in parallel. As real world scenario user won't and can't do this. With automation we like to match real world user scenarios

Instead you can go with docker safari container.


Regards,
Vikram

On Thursday, October 4, 2018 at 2:54:17 PM UTC+2, Nagarjuna Reddy K wrote:

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/ZRMd9dptNfA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.

⇜Krishnan Mahadevan⇝

unread,
Oct 11, 2018, 6:16:11 AM10/11/18
to seleniu...@googlegroups.com
I don't think you can run safari tests on docker yet since the docker images aren't available yet ( to the best of my knowledge ) 

I havent explored the built-in Safari driver binary provided by Apple to support safari automation using selenium. 

So if the driver doesn't support concurrency, then the only way to run test multiple concurrent safari based selenium tests is to run them on multiple OSX machines or VMs ( I believe that OSX has a server OS flavour on which you can host multiple VMs ). 

You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

Reply all
Reply to author
Forward
0 new messages