Q4437
>>9511175 (in Q post)
def visit_twitter_and_log_in
visit 'https://cards-dev.twitter.com/validator'📁
find('input.js-username-field').set(ENV['TWITTER_USERNAME'])
find('input.js-password-field').set(ENV['TWITTER_PASSWORD'])
click_on('Log in')
end
def enter_url_and_click_preview(url)
find('input.FormControl').set(url)
click_on('Preview card')
result = has_content?('Page fetched successfully')
visit 'https://cards-dev.twitter.com/validator'📁
end
end
Anyone know what language this code is for? It looks like web automation/testing/scraping code but it's nothing I've seen before. I use selenium but that uses javascript. def is python but there's no parentheses or the colon, but it does look pythonesque…
Or is it just slightly elaborate pseudo code?