我正在尝试在 iFrame 内的下拉列表中选择一个值。框架嵌套在表格中。HTML:
<html class ="some text">
<head>...</head> <body id="htmlBody">
<div class= "modalWindow ui-dialog-content ui-widget-content ModalWindow containsFrame" id="ui-id-2">
<iframe src= "/MyApplicantPortal/Applicant/254471/SelectOrderTemplate?t=1">
#document
<html class = "some text"
<head id= "Head1">
<body id="htmlBody">
<form method= "post" action="SelectOrderTemplate?t=1" id="form1">
<div class = "ModalContent">
<Table>
<td class="label1">
<Select id= "MyselList" </td>
我的代码:
element(:select_frame, :frame, :src => MyApplicantPortal\/Applicant\/\d+\/SelectOrderTemplate\?t=1/)
select_list(:template) {select_frame_element.select_list_element(:id => 'MyselList')}
错误:
Watir::Exception::UnknownFrameException: unable to locate frame using {:src=>/MyApplicantPortal\/Applicant\/\d+\/SelectOrderTemplate\?t=1/, :tag_name=>"frame"}