my $tool_elm = $driver->find_element("//select[\@id='current-diag-tool']");
my $val = $elm->get_value();
if( $val eq '2' ){
$elm->click();
last;
}
}
# my @opt_elms = $driver->find_child_elements($tool_elm, "//option");
my @opt_elms = $driver->find_child_elements($tool_elm, "./option"); #如果要找某一个select下面的子元素,一定要用./,否则找到的是整个页面里面的option
my $val = $elm->get_value();
if( $val eq '2' ){
$elm->click();
last;
}
}