Xpath と Id 情報が次のラジオ オプション ボタンをクリックしたい:-
<input id="ContentView_PageLayout_FlightFinderTab_HomepageTabs_FlightsTab_pnlTripType_TripType#0"
type="radio" onclick="showHideReturningDate('return');" checked="checked" value="Return"
name="ContentView$PageLayout$FlightFinderTab$HomepageTabs$FlightsTab$pnlTripType$TripType">
Xpath:
//*[@id="ContentView_PageLayout_FlightFinderTab_HomepageTabs_FlightsTab_pnlTripType_TripType#0"]
<input id="ContentView_PageLayout_FlightFinderTab_HomepageTabs_FlightsTab_pnlTripType_TripType#1"
type="radio" onclick="showHideReturningDate('oneway');"
value="One Way" name="ContentView$PageLayout$FlightFinderTab$HomepageTabs$FlightsTab$pnlTripType$TripType">
Xpath:
//*[@id="ContentView_PageLayout_FlightFinderTab_HomepageTabs_FlightsTab_pnlTripType_TripType#1"]
IDを取得するためにこれらの方法を試しました:
1:
return By.XPath("(//input[@id="++'ContentView_PageLayout_FlightFinderTab_HomepageTabs_FlightsTab_pnlTripType_TripType#1']");
2:
return By.Id("ContentView_PageLayout_FlightFinderTab_HomepageTabs_FlightsTab_pnlTripType_TripType#1");
3:
return By.XPath("//*[@id=" + '"' + "ContentView_PageLayout_FlightFinderTab_HomepageTabs_FlightsTab_pnlTripType_TripType#1" + '"' + "]");