groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohan Radhakrishnan <radhakrishnan.mo...@gmail.com>
Subject Re: Catch clause difference
Date Wed, 10 Jan 2018 09:55:39 GMT
Yes Jochen. That worked.

import org.openqa.selenium.NoSuchElementException

I hadn;t imported anything.

Mohan

On 9 January 2018 at 22:58, Jochen Theodorou <blackdrag@gmx.org> wrote:

>
>
> Am 09.01.2018 um 16:38 schrieb Dinko Srko─Ź:
>
>> On 9 January 2018 at 13:26, Mohan Radhakrishnan
>> <radhakrishnan.mohan@gmail.com> wrote:
>>
>>> I don't see java.util.NoSuchElementException anywhere.
>>>
>>
>>  From the line:
>>
>>      }catch( NoSuchElementException nse ){
>>
>> we don't know which `NoSuchElementException` you're trying to catch
>> (see what is imported), but we do know that the thrown exception is
>> `org.openqa.selenium.NoSuchElementException`.
>>
>> The conclusion is:
>>
>> a) the `NoSuchElementException` in the catch clause shown above is not
>> `org.openqa.selenium.NoSuchElementException`, or
>> b) as Felix noted, different class loaders are being used
>>
>
> if there is no "import org.openqa.selenium.NoSuchElementException" or
> "import org.openqa.selenium.*", then (a) has an extremely high probability
>
> bye Jochen
>

Mime
View raw message