1

Webサイトの特定のボタンをクリックしようとしています。これがコードです。

<div id="ff_submit_button">


<input type="image" onclick="javascript:return preFareFinderSubmitActions('The following information is needed to process your request:', 'Problem Pricing the Itinerary: Atlantic City Express Service offers adult fares only for all passengers.  Please modify your selection to continue. \n[Error ID: 1121S]')" src="/images/en/btn_ff_go.gif" alt="Click to Find Tickets" border="0" name="_handler=url.presentation.handler.request.rail.urlRailSearchRequestHandler/_xpath=/sessionWorkflow/productWorkflow[@product='Rail']">

</div>

現時点では、ボタンにこのコードを入力して「alt="クリックしてチケットを検索」を押しています。

    For Each webpageelement As HtmlElement In allelements

        If webpageelement.GetAttribute("alt") = "Click to Find Tickets" Then
            webpageelement.InvokeMember("click")

        End If

それは機能しますが、問題は、そのaltを使用する別の領域がWebサイトにあることです。したがって、ユーザー名とパスワードの入力を求められます。私のコード行は現在ボタンの中にあります。

4

1 に答える 1

0

ではなく、altチェックするのに適した要素は次のとおりです。idこれは、一意の識別子を提供することを目的としていますが、入力タグに追加する必要があります。

于 2012-11-20T15:26:15.807 に答える