#
# Waits until the element is present.
#
# @example
# browser.button(:id =>'foo').wait_until_present
#
# @param [Fixnum] timeout seconds to wait before timing out
#
# @see Watir::Wait
# @see Watir::Element#present?
#
def wait_until_present(timeout = 30)
message = "waiting for #{selector_string} to become present"
Watir::Wait.until(timeout, message) { present? }
end
def until(timeout = 30, message = nil, &block)
end_time = ::Time.now + timeout
until ::Time.now >end_time
result = yield(self)
return result if result
sleep INTERVAL
end
raise TimeoutError, message_for(timeout, message)
end
希望对你有帮助
你根本没有进入ruby控制台,ruby要先运行ruby指令才进入ruby环境。$,这是书本上表示的命令提示符。你要看一下书本上的前言或者第一章,一般书本在最开始会说明一下符号,字体格式代表的含义,你没有从头看起,漏掉了重要的提示信息。书本开头肯定告诉你$,表示命令提示符,这个字符不需要你输入的。
cd testsass已经成功了,你又用cd ..返回了,这是不对的。
touch style.css,要单独输入的,不要和cd命令混在一块。
你连基本的命令行概念都没有搞懂。
$是Linux的提示符,你用了Windows,估计后面很多问题,因为书本是以Linux为目标系统个来写的。
fatal: unable to access ' https://github.com/XXXXXX' : LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
解决方式1
git config --global http.postBuffer 4194304000`
解决方式2
更换Ruby镜源
2.查看Ruby环境:
ruby -v
安装Ruby环境:
brew install ruby
设置git超时时长
git config --global http.lowSpeedLimit 1000(建议0)
git config --global http.lowSpeedTime 600(建议999999)
以上配置后,只有一分钟(600秒)传输速率都低于 1KB/s 的话才会 timeout,即使慢也可以慢慢等。
SDK "iphoneos" can not be located
具体内容:
xcrun:_ error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
解决办法:
sudo xcode-select --switch /Applications/Xcode.app
curl: (56) LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
解决办法:
LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
解决办法:
git config 可能是使用了代理
git config --global http.sslBackend "openssl"