;{->" + script + "}");
cl.setDelegate(context);
cl.setResolveStrategy(Closure.DELEGATE_FIRST);
return cl.call();
}
Thanks,
Mohan
On 16 January 2018 at 19:35, Mohan Radhakrishnan <
radhakrishnan.mo...@gmail.com> wrote:
> I mean that this works if the DSL com
nuary 2018 at 19:06, Mohan Radhakrishnan <
radhakrishnan.mo...@gmail.com> wrote:
> Hi,
>
> I am reading the book 'Groovy in Action' and this code is based on
> that.
>
> My base script stores 'DynamicXPath' like this.
>
> abstract class AxesBaseScript exte
Hi,
I am reading the book 'Groovy in Action' and this code is based on
that.
My base script stores 'DynamicXPath' like this.
abstract class AxesBaseScript extends Script {
public DynamicXPath bootStrap(String initialPath ){
this.binding.dxp.bootStrap initialPath
}
}
And
Hi,
I didn't know Groovy DSL's could be almost like plain english as shown
in
http://docs.groovy-lang.org/docs/latest/html/documentation/core-domain-
specific-languages.html
Is that the latest recommendation ? My use case is this.
I would like to create a small library to create XPath
Yes Jochen. That worked.
import org.openqa.selenium.NoSuchElementException
I hadn;t imported anything.
Mohan
On 9 January 2018 at 22:58, Jochen Theodorou <blackd...@gmx.org> wrote:
>
>
> Am 09.01.2018 um 16:38 schrieb Dinko Srkoč:
>
>> On 9 January 2018 at 13
lt;dinko.sr...@gmail.com> wrote:
>
>> Is your `NoSuchElementException` in the catch clause by any chance
>> `java.util.NoSuchElementException`?
>>
>> cheers,
>> Dinko
>>
>> On 8 January 2018 at 16:18, Mohan
es printing out `nse` in both cases show?
>
> On Mon, Jan 8, 2018 at 11:02 PM, Mohan Radhakrishnan <
> radhakrishnan.mo...@gmail.com> wrote:
>
>> Hello,
>>
>> These catch clauses are somehow different from each other. Why ?
>>
>> In the first case 'No
Hello,
These catch clauses are somehow different from each other. Why ?
In the first case 'NoSuchElementException' is somehow escaping the 'catch'
block. My test fails.
But the second clause succeeds as expected.
Clause 1 :
catch( NoSuchElementException nse ){
throw new
compileTests
Thanks,
Mohan
On 8 January 2018 at 09:14, Mohan Radhakrishnan <
radhakrishnan.mo...@gmail.com> wrote:
> Hi Keith,
>
> The error when I run Maven test is this.
>
> [ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-
> plugin:1.2:g
le(running) {
> doSomeWork()
> Thread.sleep(1000) {
> // Called then Thread.sleep() is interrupted.
> running = false
> return true
> }
> }
> }
> // ...
> t.interrupt()
> t.join()
>
>
> Finally, if you are doing complicated threading work you should really be
> usin
Hi,
I am new to groovy. Here I tried to create
a simple wrapper around 'sleep'.
I see the error in the subject at 'def'. What's wrong ?
Thanks,
Mohan
/**
* Our custom sleep logic.
*/
trait ThreadSleeper {
long ms
Closure cl = {}
/*Sleep with an action taken*/
I posted this too soon.
This line
Function<WebDriver, Boolean> application = { wd ->
wd.findElement(By.name("q"))}
removes that error. Hope this is the right way.
Thanks,
Mohan
On 11 December 2017 at 15:06, Mohan Radhakrishnan <
radhakrishnan.mo...@gmail.com> wro
Hi,
When I try to pass a lambda to a Selenium API call I see this error.
Believe this version of Selenium uses Guava lambdas.
I understand that I need to be explicit and specify whether it is a
Function or a Predicate. But don't know how to do this with groovy.
So here I may have to explicitly
13 matches
Mail list logo