<commit_before>require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe "Google Search" do
  
  it "can find SeleniumHQ" do
    page.open "http://www.google.com/webhp?hl=en"
    page.title.should eql("Google")
    page.type "q", "Selenium SeleniumHQ"
    page.value("q").should eql("Selenium SeleniumHQ")
    page.click "btnG", :wait_for => :page
    page.text?("seleniumhq.org").should be_true
    page.title.should eql("Selenium SeleniumHQ - Google Search")
  end

  it "wait_for_text variant" do
    page.open "http://www.google.com/webhp?hl=en"
    page.title.should eql("Google")
    page.type "q", "Selenium SeleniumHQ"
    page.value("q").should eql("Selenium SeleniumHQ")
    page.click "btnG", :wait_for => :text, :text => "Results"
    page.wait_for :wait_for => :value, :element => 'q', :value => "Selenium SeleniumHQ"
    page.wait_for :wait_for => :no_value, :element => 'q', :value => "Mercury"
    page.wait_for :wait_for => :no_text, :text => "Gre sacdas asdcasd"
    page.title.should eql("Selenium SeleniumHQ - Google Search")
  end

  it "can search videos" do<commit_msg>JariBakken: se-client - fix for Google now downcasing queries on their result page title.<commit_after>require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe "Google Search" do
  
  it "can find SeleniumHQ" do
    page.open "http://www.google.com/webhp?hl=en"
    page.title.should eql("Google")
    page.type "q", "Selenium SeleniumHQ"
    page.value("q").should eql("Selenium SeleniumHQ")
    page.click "btnG", :wait_for => :page
    page.text?("seleniumhq.org").should be_true
    page.title.should eql("selenium seleniumhq - Google Search")
  end

  it "wait_for_text variant" do
    page.open "http://www.google.com/webhp?hl=en"
    page.title.should eql("Google")
    page.type "q", "Selenium SeleniumHQ"
    page.value("q").should eql("Selenium SeleniumHQ")
    page.click "btnG", :wait_for => :text, :text => "Results"
    page.wait_for :wait_for => :value, :element => 'q', :value => "Selenium SeleniumHQ"
    page.wait_for :wait_for => :no_value, :element => 'q', :value => "Mercury"
    page.wait_for :wait_for => :no_text, :text => "Gre sacdas asdcasd"
    page.title.should eql("selenium seleniumhq - Google Search")
  end

  it "can search videos" do
{'fraction_non_alphanumeric': 0.157254561251086, 'fraction_numerical': 0.0, 'mean_word_length': 3.9526881720430107, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5518816', 'n_tokens_mistral': 863, 'n_tokens_neox': 822, 'n_words': 189}