单击chrome窗口中的按钮 [英] Clicking the button in chrome window

查看:94
本文介绍了单击chrome窗口中的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在尝试创建一个表单,我可以在其中输入网址,当我点击按钮时,它会在Chrome中打开该链接。我用这段代码实现了这个目标:



Hello,
I'm trying to create a form where I will be able to type the url and when I click on the button that it opens that link in Chrome. I achieved that by this code :

private void button1_Click(object sender, EventArgs e)
       {
           var prs = new ProcessStartInfo("new_chrome.exe");
           prs.Arguments = textBox1.Text;
           Process.Start(prs);
       }



现在我希望能够在打开一些链接后点击该网页上的按钮,点击按钮进入我的C#程序界面。

任何人都可以帮助我吗?

谢谢



我有什么尝试过:



我尝试从网页,课程等获取id。我想用C#webbrowser实现它会更容易,但对我来说这是对于所有事情都很重要。


Now I want to be able after opening of some link to click on the button on that web page by clicking on the button in my C# program interface.
Can anyone help me?
Thank you

What I have tried:

I tried getting the id's from webpage, classes etc. I guess it would be easier to achieve it using C# webbrowser, but for me it's important to everything happens in chrome.

推荐答案

你完全迷失了。 Process.Start 是服务器端代码;它将启动Chrome ...在服务器端。实际上,那里没有Chrome。如果它在那里,或者你想使用 WebBrowser 控件,谁会查看服务器端的网页?清洁团队中有人用刀片电脑清除无数机架上的灰尘?荒谬,总计。



这不是所谓的Web应用程序或网站。开发Web产品是为了通过任何非废话的Web浏览器使用,而不仅仅是Chrome。技术的任何部分都不假设Chrome已安装。打开网页的问题就像在HTML中使用锚一样简单。就是这样。



如果你不明白,那就对不起;为你解释它是没有任何意义的。从解释计算机做什么,软件做什么(很可能你没有线索)和Web做什么(你当然没有线索)开始,这不是一个适当的解释事情的地方。如果你愿意,请学习基础知识,如果你有任何问题,请回来。



-SA
You are totally lost. Process.Start is the server-side code; it will start Chrome… on the server side. Actually, there is no Chrome there. If it was there, or if you wanted to use the WebBrowser control, who would look at a Web page on the server side? Someone from a cleaning team removing dust from countless racks with blade computers? Absurd, total.

This is not what is called "Web application" or "Web site". Web products are developed to be used through any non-nonsense Web browser, not just Chrome. No part of technology assumes that Chrome is even installed. The problem of opening of a Web page is as simple as having an anchor in HTML. That's it.

If you don't understand it, then sorry; it won't make any sense to explain it for you. This is not a proper place for explaining things starting from the explanation of what a computer does, what software does (it's very likely that you have no clue) and what Web does (you most certainly have no clue). Please, if you want, learn the basics and, if you have any problems, come back.

—SA


这篇关于单击chrome窗口中的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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