Grails 如何在Geb模块中获取基本元素属性
给定HTML: 傻瓜 和页面对象Grails 如何在Geb模块中获取基本元素属性,grails,groovy,module,geb,Grails,Groovy,Module,Geb,给定HTML: 傻瓜 和页面对象 class FooPage extend geb.Page { static content = { foo = { Module FooModule, $('.foo') } } } 从模块中获取@href元素的正确实现是什么 class FooModule extends geb.module { static content = { smartField = { doSomethingSmartW
class FooPage extend geb.Page {
static content = {
foo = { Module FooModule, $('.foo') }
}
}
从模块中获取@href元素的正确实现是什么
class FooModule extends geb.module {
static content = {
smartField = { doSomethingSmartWith(?.@href) }
}
}
我已经试过了,这个,委托,基本,$和@,它们都不起作用。Derp,我在发布问题后立即发现了它$() 如果这对某人有帮助:
class FooModule extends geb.module {
static content = {
smartField = { doSomethingSmartWith($().@href) }
}
}
Derp,我在发布问题后立即找到了它$() 如果这对某人有帮助:
class FooModule extends geb.module {
static content = {
smartField = { doSomethingSmartWith($().@href) }
}
}