in the answer to this question Access to the div element in the array of li elements and when I look here http://wiki.openqa.org/display/WTR/Collections+of+HTML+Elements
I donβt see or understand what I need to do
what I'm trying to do is make a table with my guilds player_name, player_id and player_lvl.
This is a page where there are members of the guild. guild page it is a sample html
<div class="guild_board"> <div class="item_box_guild" data-playerid="1256824509"> <a onclick="doCmd(81,{'player_id':'1256824509'})"><div class="tile_50"> <div class="avatar_container_50"> <div class="avatar_image" style="background-image:url(//assets.ageofchampions.com/avatar/09/45/82/56/12/avatar_1351896996145.png);"> </div> </div> <div class="over"> <img src="http://profile.ak.fbcdn.net/hprofile-ak-ash4/187582_1256824509_1172546357_q.jpg"> </div> <div class="lock"></div> </div> </a> <div class="content"> <div class="stat" style="width:225px;"> <a onclick="doCmd(81,{'player_id':'1256824509'})">~|SR|~ Kariselle</a> | Level 348 <hr> Battle Score: 23,951,169
this code works to get the first member, and I could do (=> index (2)) to get the next member and so on. on momunt we have only 10 members, but it can become much larger. and if I donβt need it, I donβt want to write it for every participant.
require 'rubygems' require 'watir-webdriver' require 'google_drive' b = Watir::Browser.new b.goto 'http://game.ageofchampions.com/aoc/?cmd%5B0%5D=112&guild_id=138668' b.text_field(:id => 'email').set 'email' b.text_field(:id => 'pass').set 'psswd' b.button(:name => 'login').click session = GoogleDrive.login('username', 'pass') ws=session.spreadsheet_by_key('spreadsheethe').worksheets[0] b.goto 'game.ageofchampions.com/aoc/?cmd%5B0%5D=112&guild_id=138668'
source share