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 d
I posted this too soon.
This line
Function 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> wrote:
> Hi,
>
> When
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*/
def
ning) {
> 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
> u
mpile
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:
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 NoSuchWidgetExcep
inting 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
NoSuchElementException` in the catch clause by any chance
>> `java.util.NoSuchElementException`?
>>
>> cheers,
>> Dinko
>>
>> On 8 January 2018 at 16:18, Mohan Radhakrishnan
>> wrote:
>> > In the second case it is this.
>> >
>> > org.
Yes Jochen. That worked.
import org.openqa.selenium.NoSuchElementException
I hadn;t imported anything.
Mohan
On 9 January 2018 at 22:58, Jochen Theodorou wrote:
>
>
> Am 09.01.2018 um 16:38 schrieb Dinko Srkoč:
>
>> On 9 January 2018 at 13:26, Mohan Radhakrishnan
>>
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 axes(
to help them. The
sad part is that the power of Groovy or even JDK 8 isn't used properly in
this particular RPA tool.
It is rather primitive in this case.
Thanks,
Mohan
On 10 January 2018 at 22:12, Jochen Theodorou wrote:
>
>
> Am 10.01.2018 um 15:35 schrieb Mohan Radhakri
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 h
'''
}
Mohan
On 16 January 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
.evaluate("{->" + 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
14 matches
Mail list logo