Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/266.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C#如何获取Firefox的当前url_C#_Firefox_Ui Automation - Fatal编程技术网

C#如何获取Firefox的当前url

C#如何获取Firefox的当前url,c#,firefox,ui-automation,C#,Firefox,Ui Automation,我正在创建一个C#应用程序来获取Firefox的当前url 我已经测试了很多算法,但都不起作用 我尝试了以下链接: 还尝试了这个脚本(不起作用!!!): 谢谢但是NDde不能与新的firefox一起使用 DdeClient dde = new DdeClient(browser, "WWW_GetWindowInfo"); dde.Connect(); string url = dde.Request("URL", int.MaxValue); string[] text = url.Spl

我正在创建一个C#应用程序来获取Firefox的当前url

我已经测试了很多算法,但都不起作用

我尝试了以下链接:

还尝试了这个脚本(不起作用!!!):


谢谢但是NDde不能与新的firefox一起使用
DdeClient dde = new DdeClient(browser, "WWW_GetWindowInfo");
dde.Connect();
string url = dde.Request("URL", int.MaxValue);
string[] text = url.Split(new string[] { "\",\"" }, StringSplitOptions.RemoveEmptyEntries);
dde.Disconnect();
return text[0].Substring(1);