小编J.A*_*ari的帖子

如何使用 javascript 通过 appium 打开/关闭辅助功能

我有这个用于 android 的 adb shell 命令并尝试使用终端,它运行良好。

但不确定如何使用 appium 命令在框架中使用它。

// disable
adb shell settings put secure enabled_accessibility_services com.android.talkback/com.google.android.marvin.talkback.TalkBackService

// enable
adb shell settings put secure enabled_accessibility_services com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService
Run Code Online (Sandbox Code Playgroud)

javascript accessibility talkback appium appium-android

5
推荐指数
1
解决办法
973
查看次数

如何在ruby中简化过多的AND/OR

以下是我的代码.如何简化此代码?
我只是想避免太多的&&条件.

假设我有两个网址:

ipt_string = www.abc.com/catogories/profile/heels/

ipt_string = www.abc.com/me/payment/auth/

    def to_uri(ipt_string)
        point = ipt_string.gsub('{', '#{')
        if @profile && 
           !point.include?('/catogories/') && 
           !point.include?('/profile/') && 
           !point.include?('/heels/') && 
           !point.include?('/me/') && 
           !point.include?('/payment/') && 
           !point.include?('/auth/')
        { ... }
Run Code Online (Sandbox Code Playgroud)

ruby

2
推荐指数
1
解决办法
97
查看次数

如何使用RVM在Mac OS上安装Ruby 2.4.0

我无法安装Ruby 2.4.0.

  • RVM版本是1.29.1
  • Rubygems版本是2.6.11

我正在尝试使用以下方法安装Ruby 2.4.0:

rvm install ruby-2.4.0
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.11/x86_64/ruby-2.4.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx_brew.
Installing requirements for osx_brew.
Updating system...........
Error running 'requirements_osx_brew_update_system ruby-2.4.0',
showing last 15 lines of /Users/bbc-admin/.rvm/log/1492510247_ruby-2.4.0/update_system.log
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.'
++ rvm_pretty_print stderr
++ case "${rvm_pretty_print_flag:=auto}" in
++ case "${TERM:-dumb}" in …
Run Code Online (Sandbox Code Playgroud)

ruby macos rvm

2
推荐指数
1
解决办法
2738
查看次数