-
Open a browser
# start an instance of firefox with selenium-webdriver driver = Selenium::WebDriver.for :firefox # :chrome -> chrome # :ie -> iexplore
- Go to a specified URL
# deb http://mirrors.aliyun.com/ubuntu trusty main restricted | |
# deb http://mirrors.aliyuncs.com/ubuntu trusty main restricted | |
# deb http://mirrors.aliyun.com/ubuntu trusty-updates main restricted | |
# deb http://mirrors.aliyuncs.com/ubuntu trusty-updates main restricted | |
# deb http://security.ubuntu.com/ubuntu trusty-security main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://mirrors.aliyun.com/ubuntu trusty main restricted |
Follow the steps below to install Team City 9.0.3 on Ubuntu with Nginx as the proxy for port 80.
Install Team City:
# will install on port 8111
sudo wget -c https://gist.githubusercontent.com/huangzhichong/843b7ccdde3bcf1aa87d0510c15b94b0/raw/097c1473a89160ce35611595982b3c02e165ca43/teamcity-install.sh -O /tmp/teamcity-install.sh
I recently had to install MySQL 5.6 on Ubuntu 12.04 from a .deb package on the MySQL website. It seems that either the package has been updated recently or nobody uses this method to install so I ended up running into endless problems. Through trial and error I found the following method works for me. | |
Install libaio-dev: | |
sudo apt-get install libaio-dev | |
Now install your package(mine was enterprise edition, community may have a different filename): | |
sudo dpkg -i mysql-advanced-5.6.10-debian6.0-x86_64.deb | |
This will install your files to the /opt directory, instead of the more common /etc directory. No worries, all we need to do is point our system at this new directory. |
#!/usr/bin/ruby | |
require 'rss' | |
p 'Downloading rss index' | |
rss_string = open('http://feeds.feedburner.com/railscasts').read | |
rss = RSS::Parser.parse(rss_string, false) | |
videos_urls = rss.items.map { |it| it.enclosure.url }.reverse | |
videos_filenames = videos_urls.map {|url| url.split('/').last } |
plan_name: Camps CUI BVT | |
owner: smart.huang@test.com | |
status: completed | |
created_dt: 2012-1-11 | |
version: 1 | |
last_modified_dt: 2012-1-11 | |
timeout: 300 | |
actions: action | |
QAS: |
def write(text="") | |
puts text | |
end | |
def say(message, subitem=false) | |
write "#{subitem ? " ->" : "--"} #{message}" | |
end | |
def say_custom(tag, text) | |
say "\033[1m\033[36m" + tag.to_s.rjust(10) + "\033[0m" + " #{text}" |
module BingHome | |
class SearchKeyInputBox < TextInput | |
def initialize | |
TextInput.new("id","sb_form_q","SearchKeyInputBox") | |
end | |
end | |
class SearchButton < Button | |
def initialize |
def action | |
it "Case1_This is the test case 1" do | |
$driver.get "http://cn.bing.com/" | |
$wait.until{ BingHome::LinksByName.new("Images").should_exist rescue false} | |
BingHome::SearchKeyInputBox.new().should_exist | |
BingHome::SearchButton.new().should_exist | |
end | |
it "Case2_This is the test case 2" do | |
BingHome::SearchKeyInputBox.new().should_exist | |
BingHome::SearchButton.new().should_exist |