如何使用C#推出谷歌浏览器选项卡与特定的网址 [英] How to launch a Google Chrome Tab with specific URL using C#

查看:208
本文介绍了如何使用C#推出谷歌浏览器选项卡与特定的网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法,我可以启动一个选项卡(不是一个新的窗口)的谷歌浏览器与加载到它从一个自定义应用程序特定的网址?我的应用程序在 C#(.NET 4全)编码

Is there a way I can launch a tab (not a new Window) in Google Chrome with a specific URL loaded into it from a custom app? My application is coded in C# (.NET 4 Full).

我是通过SOAP从C#执行一些动作,一旦顺利完成,我希望用户通过浏览器的最终结果提交。

I'm performing some actions via SOAP from C# and once successfully completed, I want the user to be presented with the end results via the browser.

更新结果
这也是为什么我选择了Chrome的专门和我不针对其他浏览器的原因。
在这里讨论的SOAP服务是SugarCRM公司的。我的C#应用​​程序钩到Skype的插件架构,每当传出呼叫通过Skype做,它会搜索SugarCRM的DB的电话号码,如果找到,记录通过SOAP呼叫。

UPDATE
Here's the reason why I chose Chrome specifically and am not targeting other browsers. The SOAP services in question here are of SugarCRM. My C# app hook onto Skype's plugin architecture and whenever an outgoing call is made via Skype, it searches the SugarCRM DB for the phone number and if found, records the Call via SOAP.

什么是不能做的是提供呼叫的成绩单 - 其用户必须手动锁,使其更容易为最终用户,我想以弹开具体呼叫的数据输入接口在浏览器(浏览器),以便用户可在转录键

What it cannot do is provide a transcript of the Call - which the user has to manually key in. To make it easier for the end user, I want to pop open the specific Call's data entry interface in a browser (Chrome), so that the user can key in the transcript.

这整个设置为我们的内部网络而不是公共消费 - 因此,我可以负担得起的目标只有一个特定的浏览器

This whole setup is for our internal network and not for public consumption - hence, I can afford to target a specific browser only.

为什么Chrome浏览器?怎么把...

Why Chrome? coz...


  1. Internet Explorer中: IE浏览器已经从网络外(谢天谢地)放逐
  2. 歌剧: SugarCRM公司的电子邮件模块,广泛基于JavaScript似乎在Opera故障。但是,SugarCRM公司似乎在它执行最好的..但遗憾的是这一个小小的打嗝(希望它不会)会导致其无法

  3. 火狐:这是要听起来很奇怪 - 但是由于我们的网络差一些配置,火狐经常跑入糖,问题即不能够登录自己的用户名/密码的用户密钥的用户,并保持了回到登录屏幕。并在与糖没有任何错误消息。就像我说的,这是最有可能是由于我们的网络中的一些问题,从而破坏请求数据,并不允许被正确设置cookies - 但只有火狐出现此行为(再次,我希望它不会)。

  4. Chrome浏览器:这给我们带来了我们的最后一个不错的选择,铬,它奇迹般地似乎不与任何这些条件的折磨。因此,接近6个月的各种浏览器的试验后,我们已经安顿下来Chrome浏览器SugarCRM的。用户可以自由地使用他们喜欢的任何浏览器(除IE),但是当涉及到​​SugarCRM的,它必须是浏览器,它安装在所有他们的系统。

  1. Internet Explorer: IE has been banished from out network (thankfully).
  2. Opera: The Emails module of SugarCRM, which is extensively based on JavaScript seems to malfunction in Opera. However, SugarCRM seems to perform best in it.. but sadly this one little hiccup (wish it wouldn't) renders it unusable.
  3. Firefox: This is going to sound strange - but due to some poor configuration of our network, Firefox frequently runs into problems with Sugar, namely, not being able to log a user in. Users key in their username/password and keep going back to the login screen over and over with no error messages whatsoever from Sugar. Like I said, it's most likely due to some problem in our network which corrupts the request data and doesn't allow for cookies to be set properly - but only Firefox exhibits this behaviour (again, I wish it wouldn't).
  4. Chrome: That brings us to our last decent option, Chrome, which miraculously doesn't seem to be afflicted with any of these conditions. So after close to 6 months of experimenting with various browsers, we've settled down for Chrome for SugarCRM. Users are free to use any browser (except IE) they like, but when it comes to SugarCRM, it has to be Chrome, which is installed on all their systems.

这应该为您提供处所我的询问....:D

This should provide you with the premises for my enquiry.... :D

推荐答案

我最近碰到这个问题。
以便简化到 chrfin的回应,因为如果安装了Chrome应该运行的道路上,你可以只拨打:

I recently came across this issue. So as a simplification to chrfin's response, since chrome should be on the run path if installed, you could just call:

Process.Start("chrome.exe", "http:\\www.YourUrl.com");

这似乎预期为我工作,打开一个新标签如果Chrome已经打开。

This seem to work as expected for me, opening a new tab if chrome is already open.

这篇关于如何使用C#推出谷歌浏览器选项卡与特定的网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆