zoukankan      html  css  js  c++  java
  • 程序打开网页

          1.System.Diagnostics.Process.Start("explorer.exe", "http://blog.csdn.net/testcs_dn");
    2.
                //调用系统默认的浏览器
                System.Diagnostics.Process.Start(http://blog.csdn.net/testcs_dn);

    3
                 //调用IE浏览器 
                System.Diagnostics.Process.Start("iexplore.exe", "http://blog.csdn.net/testcs_dn");
    4.          //从注册表中读取默认浏览器可执行文件路径
                RegistryKey key = Registry.ClassesRoot.OpenSubKey(@httpshellopencommand);
                string s = key.GetValue().ToString();

                //s就是你的默认浏览器,不过后面带了参数,把它截去,不过需要注意的是:不同的浏览器后面的参数不一样!
                //D:Program Files (x86)GoogleChromeApplicationchrome.exe -- %1
                System.Diagnostics.Process.Start(s.Substring(0, s.Length - 8), http://blog.csdn.net/testcs_dn);

  • 相关阅读:
    selenium-03-01截图函数
    selenium-03-02操作元素-等待
    [转]Linux下 tar.xz格式文件的解压方法
    selenium-05-问题2
    selenium-05-常见问题
    selenium-01-简介
    underscore
    前端底层-继承
    前端底层-面向对象3
    前端底层-面向对象2
  • 原文地址:https://www.cnblogs.com/change4now/p/5665203.html
Copyright © 2011-2022 走看看