如何使用selenium C#单击菜单项 [英] How do I click a menu item with selenium C#

查看:182
本文介绍了如何使用selenium C#单击菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此代码适用于VB中的Selenium chrome驱动程序。

driver.ExecuteScript(__ doPostBack('ctl00 $ Content $ Menu1','1'););

但我找不到用于C#和Firefox驱动程序的内容。此代码失败。你能指点我一个可能有帮助的资源吗?



网页是我的,用Asp.Net构建。它使用菜单控件显示4个视图。



我尝试过:



我搜索了一个没有成功的解决方案。如果它在Selenium文档中,我无法找到它。

解决方案

内容


Menu1','1' );;);

但我找不到用于C#和Firefox驱动程序的内容。这段代码失败了。你能指点我一个可能有帮助的资源吗?



网页是我的,用Asp.Net构建。它使用菜单控件显示4个视图。



我尝试了什么:



我搜索了一个没有成功的解决方案。如果它在Selenium文档中,我无法找到它。


Firefox 55和Selenium IDE |官方Selenium Blog [ ^ ]

This code works with Selenium chrome driver in VB.
driver.ExecuteScript("__doPostBack('ctl00$Content$Menu1','1');");
But I can't find what to use with C# and Firefox Driver. This code fails. Can you point me to a resource that might help?

The web page is mine and built with Asp.Net. It uses a menu control for showing 4 views.

What I have tried:

I have searched for a solution without success. If it is in the Selenium document, I am unable to find it.

解决方案

Content


Menu1','1');");
But I can't find what to use with C# and Firefox Driver. This code fails. Can you point me to a resource that might help?

The web page is mine and built with Asp.Net. It uses a menu control for showing 4 views.

What I have tried:

I have searched for a solution without success. If it is in the Selenium document, I am unable to find it.


Firefox 55 and Selenium IDE | Official Selenium Blog[^]


这篇关于如何使用selenium C#单击菜单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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