首页 \ 问答 \ Watir和Javascript(Watir and Javascript)

Watir和Javascript(Watir and Javascript)

我正在研究多个Web测试工具。 我正在尝试watir。 我主要关心的是处理JavaScript。 我只想知道是否有人可以给我一个关于在watir处理javascript的概述。 它有哪些陷阱和困难? 它基本上是使用JavaScript注入来告诉页面该怎么做?

如果有人想建议其他网络测试工具,如watir,我将不胜感激。 我首先尝试硒,发现它是不可靠的。

市场上有没有廉价的工具?

谢谢!


I am looking into multiple web testing tools. I am trying watir now. My main concern is dealing with javascript. I just want to know if anyone can give me an overview on dealing with javascript in watir. What are some of the pitfalls and difficulties with it? Is it basically using javascript injections to tell the page what to do?

And if someone wants to suggest other web testing tools like watir I would appreciate it. I tried selenium first and found it to be a tad unreliable.

Are there any cheap tools on the market?

Thank You!


原文:https://stackoverflow.com/questions/5558330
更新时间:2022-03-04 09:03

最满意答案

是的,Realm确实支持递归数据结构,但请阅读本节有关如何创建Realm模型类的信息: https//realm.io/docs/java/latest/#models

在您的情况下,模型类应如下所示:

public class FileItem extends RealmObject {
      private String name;
      private RealmList<FileItem> elements;
}

Yes, Realm does support recursive data structures, but please read this section on how to create Realm model classes: https://realm.io/docs/java/latest/#models

In your case the model class should look like this:

public class FileItem extends RealmObject {
      private String name;
      private RealmList<FileItem> elements;
}

相关问答

更多
  • 编辑:对于Realm的新版本,添加Realm.init(上下文上下文) Realm.init(context); RealmConfiguration config = new RealmConfiguration .Builder() .deleteRealmIfMigrationNeeded() ...
  • 与平台附带的SQLite不同,Realm附带了自己的本机库。 这意味着不幸的是,应用程序大小会增加。 您可以使用此处所述的ABI拆分将该数字降至约1MB(通过为每个CPU架构构建应用程序): https://github.com/realm/realm-java/blob/master/examples/gridViewExample/build.gradle#L30-Lundefined Unlike SQLite which is shipped with the platform, Realm com ...
  • 在您检查realm.isClosed()它确实没有关闭。 但是,您已经打开了一个事务,为了完成该事务,仍然需要打开该域实例。 问题是,您在事务中关闭此实例。 简单的解决方案 :从事务内部删除realm.close() ,它不需要在一个中。 At the moment that you check realm.isClosed() it is not closed indeed. However, you have opened a transaction which, in order to complet ...
  • 确保您将Realm.framework拖放到项目常规设置选项卡中的“嵌入式二进制文件”部分。 还要确保你有“嵌入框架”构建阶段,Realm.framework包含在那里 文档中的安装部分根据您使用的是CocoaPods还是Carthage选择一个选项卡 注意这一点: 如果在Swift中使用Realm,请将Swift / RLMSupport.swift中的文件拖到Xcode项目的文件导航器中,选中复制项目(如果需要)复选框。 Make sure you dragged Realm.framework to ...
  • 物理删除数据,但现在Realm不会自动回收已用空间(它在我们的TODO上)。 同时,如果要回收空间,可以手动调用Realm.compactRealm(realmConfig) : https : Realm.compactRealm(realmConfig) .realm.RealmConfiguration- The data is physically deleted, but right now Realm doesn't automatically reclaim the used space (i ...
  • 是的,Realm确实支持递归数据结构,但请阅读本节有关如何创建Realm模型类的信息: https : //realm.io/docs/java/latest/#models 在您的情况下,模型类应如下所示: public class FileItem extends RealmObject { private String name; private RealmList elements; } Yes, Realm does support recursive ...
  • 不要忘记你正在执行一个事务,所以如果copyToRealmOrUpdate()失败,那么事务就会被取消 ,这意味着你不会丢失所有的数据。 就我个人而言,我曾经使用“全部删除”方法,如果您可以清除所有表格,那么它不会导致问题,但是如果您有第三个表格指向Conversation和Message (例如User.class ),你会使所有关系无效。 所以我个人更喜欢这样合并。 合并数据并删除所有不在您保存的列表中的数据 。 public class Contact { @PrimaryKey pr ...
  • 结论,使用Realm自动管理对象几个月后: 在使用Realm的自动更新对象时,几乎不可能将数据库代码集中在数据访问对象(DAO)类等中。 每个模型对象上的每个setter都需要在Realm事务块中。 如果你使用RetroLambda,调用相对干净:realm.executeTransaction(r - > user.setFirstName(firstName)); 这些块将立即遍布您的项目。 忘记在事务中包装setter方法(或构造函数调用)会使应用程序崩溃。 相信我,在采用自动更新对象的前几周会发生很 ...
  • 您可以使用RLMArray,其中RLMArray是Realm中用于定义多对多关系的容器类型。 正如官方Realm文档中提到的目标c检查示例一样。 也可以通过这个链接来帮助RLMArray doc You can use RLMArray , where RLMArray is the container type in Realm used to define to-many relationships. As mentioned in the official Realm documentation fo ...
  • 看到这里 ,它与你的问题非常相似,正如所建议的那样, 如果在空结果查询上调用max相关函数或查询的结果都是空值,则maximumInt将引发异常。 所以使用RealmQuery.max()代替。 See here, It's fairly similar as your issue, So as suggested, If max related function is called on an empty results query or query's results are all null valu ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)