I have the same problem as John's.
After clicking on a button, there is an alert popup. But I get
NullPointerException when I use driver.switchto().alert().getText().
There is only one window is returned when I use
driver.getWindowHandles().
Any idea?
Thanks,
Yanan
On Apr 24, 10:36 am, Brian Kitchener <
kitchener.br...@gmail.com>
wrote:
> You can wrap anything in a try/catch statement. And then it won't
> throw an error.
>
> On Apr 21, 9:57 am, Chuck Woodraska <
chuck.woodra...@gmail.com> wrote:
>
> > In Selenium 2, is there a way to click a button and then checkifan
> >alertexistsafter the button click?IfitexistsI want to accept the
> >alertotherwise I would just move on to my next step.