From: aidy Date: 2008-03-04T01:30:09+09:00 Subject: Re: YAML Hi All (greg) I just can't get the code to iterate through both docs. def SmokeTest.create_from_yaml_file(filename) require 'yaml' log = File.open(filename) #yp = YAML::load_documents(log) { |data| YAML::each_document(log) { |data| obj = new(data['test'], data['url']) obj.register(data['first_name'], data['surname'], data['email'], data['password'], data['registration']) obj.login_to_site(data['email'], data['password']) obj.search_for_film(data['search_term'], data['expected_search_result']) obj } end SmokeTest.create_from_yaml_file('C:\tiscali.yaml') test: tiscali url: http://tiscali3-test.vizumi.com/ first_name: aidy surname: lewis email: testautomated6@googlemail.com password: password registration: KJHDF123 search_term: Alien expected_search_result: Alien 3 test: Vizumi url: http://vizumi3-test.vizumi.com/ first_name: aidy surname: lewis email: testautomated6@googlemail.com password: password registration: KJHDF123 search_term: Alien expected_search_result: Alien 3 Cheers Aidy