Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/23.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/15.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
.net vb net单击网页上的选项卡按钮_.net_Vb.net_Web - Fatal编程技术网

.net vb net单击网页上的选项卡按钮

.net vb net单击网页上的选项卡按钮,.net,vb.net,web,.net,Vb.net,Web,全新的,我无法让我的代码点击并激活网页上的选项卡按钮,我试图激活的网站部分是 class=“tabButton约定存储表” “网络历史” 感谢您的支持,我通过以下操作使其正常工作 For Each element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("span") If element.GetAttribute("className") = "lpview_tabButton tabBut

全新的,我无法让我的代码点击并激活网页上的选项卡按钮,我试图激活的网站部分是

class=“tabButton约定存储表”

“网络历史”


感谢您的支持,我通过以下操作使其正常工作

    For Each element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("span")
        If element.GetAttribute("className") = "lpview_tabButton tabButtonText" Then
            If element.GetAttribute("InnerText") = "Web History" Then
                element.InvokeMember("click")
            End If
        End If
    Next

当用类似的方法调用日历时

      For Each element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("span")
            If element.GetAttribute("className") = "filterButton lpview_filterButton EngagementsHistoryTableViewController_filterId6 filter_on" Then
                element.InvokeMember("click")
            End If
      Next
来自加州

<td class=" ui-datepicker-week-end  ui-datepicker-current-day" data-handler="selectDay" data-event="click" data-month="5" data-year="2018"><a class="ui- 
     state-default ui-state-active ui-state-hover" href="#">24</a></td>

去卡尔

 <td class=" ui-datepicker-days-cell-over  ui-datepicker-current-day ui-datepicker today" data-handler="selectDay" data-event="click" data-month="6" data-year="2018"><a 
       class="ui-state-default ui-state-highlight ui-state-active" href="#">4</a></td>


尝试了span class,lpview\u tabButton tabButtonText?感谢您的批评,我通过执行以下操作使其正常工作,而不是像li>child或li>span那样执行。但请检查哪一个更有效(或者你可以让它保持原样,因为它可以工作)。我不确定你会怎么做,你说,你能提供一个例子请,下一件事我需要做的是选择过滤器上的日期,我可以调用过滤器,它有两个日历,一个从日期,一个到日期。就像你最初做的那样,然后选择它的跨度或它的子项。element.invokeclick。您必须显示日历的html。如果选择的意思是输入您选择的日期,则为element.innertext=您的文本,同时,用新问题编辑op,而不是发布“答案”P:
<td class=" ui-datepicker-week-end  ui-datepicker-current-day" data-handler="selectDay" data-event="click" data-month="5" data-year="2018"><a class="ui- 
     state-default ui-state-active ui-state-hover" href="#">24</a></td>
 <td class=" ui-datepicker-days-cell-over  ui-datepicker-current-day ui-datepicker today" data-handler="selectDay" data-event="click" data-month="6" data-year="2018"><a 
       class="ui-state-default ui-state-highlight ui-state-active" href="#">4</a></td>