Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix click buttons #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions spec/yahoo/add_free_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def login_yahoo(username, password)
def add_drop(free_agent, abbrev, droppable)
find('#playersearchtext').set(free_agent)
sleep 5 # Sometimes, the autocomplete dropdown interferes with clicking the Search button, so we wait a little
click_button('Search')
# click_button('Search') # commented out because appears to be broken
find('input.Va-bot').click
page.should have_css('.First.Last', :count => 1)
if page.has_link?(free_agent) && page.has_link?('Add Player')
click_link('Add Player')
Expand All @@ -26,7 +27,7 @@ def add_drop(free_agent, abbrev, droppable)
if page.has_css?('#submit-add-drop-button[value^="Create claim"]')
puts 'Waivers have not cleared'
else
find('#submit-add-drop-button[value="Add %s, Drop %s"]' % [free_agent, droppable]).click
find('#submit-add-drop-button,[value="Add %s, Drop %s"]' % [free_agent, droppable]).click
puts 'Congratulations! %s was added.' % free_agent
sleep 10
end
Expand All @@ -47,12 +48,12 @@ def add_drop(free_agent, abbrev, droppable)
end

scenario "Log in and add/drop player" do
add_drop('Robby Anderson', 'A. Kamara', 'Alvin Kamara') # Replace with players you want to add and drop
add_drop('Joey Slye', 'J. Sanders', 'Jason Sanders') # Replace with players you want to add and drop
# Do not insert additional calls to add_drop() -- Create new scenarios for more players
end

scenario "Log in and add/drop another player" do
add_drop('Terrance West', 'W. Gallman', 'Wayne Gallman') # Replace with players you want to add and drop
end
# scenario "Log in and add/drop another player" do
# add_drop('Terrance West', 'W. Gallman', 'Wayne Gallman') # Replace with players you want to add and drop
# end

end