Swift Optionals(?)。(Swift Optionals(?). What's the difference between two?)
在选项(?)方面,两者之间的区别是什么? 我正试图快速拿起它似乎“?”的位置 事情,我很难掌握“?”的影响。 在不同的地方。
var beaconGroup:GroupData = filteredArray.firstObject? as GroupData var beaconGroup:GroupData = filteredArray.firstObject as GroupData
In terms of the optionals(?), what's the difference between the two? I'm trying to pick up swift and it seems that the location of "?" matters and i'm having a hard time grasping the effect of having "?" in different places.
var beaconGroup:GroupData = filteredArray.firstObject? as GroupData var beaconGroup:GroupData = filteredArray.firstObject as GroupData
原文:
最满意答案
我想NullTunnel是你在找什么?
I found the answer. I had to change the tunnel to Local Selenium.
- Download the latest version of ChromeDriver
- Set tunnel to 'NullTunnel'
- Run chromedriver --port=4444 --url-base=wd/hub
- Set your environments capabilities to [ { browserName: 'chrome' } ]
- Run the test runner
Obs:
Don't forget to copy the
chromedriver
file to your project root.I had to run on my project root
.\chromedriver --port=4444 --url-base=wd/hub
The test runner has to be run in a new command line/terminal/shell
Hope to help someone that had the same issue.
相关问答
更多-
从版本1.3.0开始,您可以在任务中运行Docker-compose: https : //concourseci.slack.com/archives/general/p1466556331001964 这似乎有效: jobs: - name: docker-compose public: true serial: true plan: - do: - task: docker-compose timeout: 20m ...
-
“运行功能测试”任务需要在“Visual Studio测试代理部署”任务之前进行。 “Visual Studio测试代理部署”任务将“测试代理”部署到所有计算机,并自动为自动化运行配置它们。 如果代理已在计算机上可用并已配置,则此任务将为无操作。 检查: https : //github.com/Microsoft/vsts-tasks/tree/master/Tasks/RunDistributedTests "Run Functional Tests" tasks needs to be precede ...
-
我在测试里面,this.skip()。 这将使用可选的消息参数跳过测试。 I inside a test, this.skip(). That will skip the test with an optional message parameter.
-
您的实习生配置为functionalSuites定义了什么? 它应该是functionalSuites: [ 'tests/functional/index' ], What does your intern config define for functionalSuites? it should be functionalSuites: [ 'tests/functional/index' ],
-
使用afterEach方法。 afterEach() { return this.remote .execute(function () { localStorage.clear(); }); }, 'my test'() { return this.remote .get(...) .execute(...) .then(welcome => { assert. ...
-
我能想到的最干净的方法是“hotwire”引导代码: // your bootstrap code above // this gets called before first test system("script_to_start_ssh_tunnel"); // this gets called after last test register_shutdown_function(function(){ system("script_to_stop_ssh_tunnel"); }); / ...
-
最初在功能测试期间运行的测试是功能测试。 浏览器并不都具有相同级别的测试支持,有时它们实现的测试功能略有不同。 实习生测试远程浏览器以确定哪些有效,哪些无效,然后尝试在可能的情况下提供一致的行为(在不同的浏览器之间保持一致)。 The tests that are initially run during functional testing are feature tests. Browsers don't all have the same level of testing support, and s ...
-
看起来您的spec_inwf.js测试文件中存在一个小的语法问题: 'intern!chai!expect', 应该 'intern/chai!expect', 您的设置其他一切看起来都很好。 注意 :如果您的项目不是Node项目,那么关于不需要使用loader.packages配置的声明并不准确。 但是,您不需要在此特定情况下使用您提供的文件结构。 amdjs软件包文档可能值得阅读,以便更好地理解此配置选项,因为它是特定于AMD的,而非特定于实习生。 希望这可以帮助。 It looks like yo ...
-
我想NullTunnel是你在找什么? I found the answer. I had to change the tunnel to Local Selenium. Download the latest version of ChromeDriver Set tunnel to 'NullTunnel' Run chromedriver --port=4444 --url-base=wd/hub Set your environments capabilities to [ { browserNam ...
-
这些是功能检测测试,用于确定您连接的Selenium服务器中的哪些功能已损坏,因此Leadfoot / Intern可以为您解决这些服务器错误。 您可以通过在您的功能中添加fixSessionCapabilities: false来阻止它,但是只有在您知道没有使用任何有缺陷的API时才应该这样做。 可以在文档中找到检测到的功能的完整列表 。 Those are the feature detection tests, used to determine which functions in the Sele ...