作者ChenRobert (羅伯陳)
看板C_Sharp
標題[問題] 請問C#輸入關鍵字跳到搜尋google搜尋?
時間Sun Jul 18 11:46:17 2021
Process explorer = new Process();
explorer.StartInfo.FileName = "explorer.exe";
explorer.StartInfo.Arguments = @"
http://www.google.com.tw/search?=" +
GetString;
explorer.Start();
請問怎麼跳到google 搜尋頁面並且搜尋指定的關鍵字
我怎麼寫都會跳到 我的文件夾
要怎麼修改?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.34.233.240 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/C_Sharp/M.1626579979.A.10D.html
explorer.StartInfo.Arguments = GetString;
我這樣輸入跳到網頁的時候,會出現
http://aaa/ 旁邊多了/ 就不能自己跳到搜索頁面了,要怎麼處裡
假設我輸入aaa,我想要跳到網頁,然後跟aaa有關的關鍵字連結就會出現。
※ 編輯: ChenRobert (1.34.233.240 臺灣), 07/18/2021 12:52:51
推 Litfal: 你為何要用Explorer開...FileName直接開網址就好了 07/18 16:01
→ Litfal: 還有你搜尋字串自己再檢查一下 有少東西 07/18 16:02
推 jinmin88: 要用c#控制網頁行為可以用Selenium library 07/25 02:55
→ jinmin88: 可以下getElementById之類的取到控件再輸入值 07/25 02:55