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
最满意答案
是的,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对象保存到数据库(Save Realm object to DB)[2023-10-21]
确保您将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 ... -
更新领域表(Update realm table)[2024-01-15]
不要忘记你正在执行一个事务,所以如果copyToRealmOrUpdate()失败,那么事务就会被取消 ,这意味着你不会丢失所有的数据。 就我个人而言,我曾经使用“全部删除”方法,如果您可以清除所有表格,那么它不会导致问题,但是如果您有第三个表格指向Conversation和Message (例如User.class ),你会使所有关系无效。 所以我个人更喜欢这样合并。 合并数据并删除所有不在您保存的列表中的数据 。 public class Contact { @PrimaryKey pr ... -
结论,使用Realm自动管理对象几个月后: 在使用Realm的自动更新对象时,几乎不可能将数据库代码集中在数据访问对象(DAO)类等中。 每个模型对象上的每个setter都需要在Realm事务块中。 如果你使用RetroLambda,调用相对干净:realm.executeTransaction(r - > user.setFirstName(firstName)); 这些块将立即遍布您的项目。 忘记在事务中包装setter方法(或构造函数调用)会使应用程序崩溃。 相信我,在采用自动更新对象的前几周会发生很 ...
-
Realm中的关系数据库?(Relational database in Realm?)[2020-08-14]
您可以使用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 ...