Access script element using WATIR
I have the following code:
<script type='text/javascript'>
$(document).ready(function(){
<!-- /$('.mc_col_header tr:odd').css({'background':'#faf8f8'}); -->
<!-- /$('.mc_col_header tr:even').css({'background':'#f5f0f0'}); -->
<!-- /$('.mc_col_header tr:first').css({'background':'#fff'}); -->
<!-- /$('.mc_col_header td',$('.mc_col_header开发者_Python百科 tr:first')).css({'background':'#fff'}); -->
<!-- /paginator -->
paginatorPosition = 'bottom';
separator = ' ';
paginatorStyle = 2;
enablePageOfOption = false;
enableSelectNoItems = false;
firstPageSymbol = "First";
nextPageSymbol = "Next »";
previousPageSymbol = "« Prev";
lastPageSymbol = "Last";
itemsPerPage = parseInt($('input.questions_per_page').attr('value'));
$('.questions').pagination();
});
</script>
And I would like to access the following using Watir:
nextPageSymbol = "Next »";
How do I implement it?
I solved the problem by finding the element using Firebug (thanks!), and created a link access using xpath:
@browser.link(:xpath, 'the_path_generated').click
精彩评论