Re: Safari Web Driver : Not able to identify Xpath

1,204 views
Skip to first unread message

Greg

unread,
Jul 27, 2012, 4:17:21 AM7/27/12
to seleniu...@googlegroups.com
It doesn't look like this is a xpath problem it looks like this is a selenium problem. What environment are you running in besides safari. Are you running headlessly? Also why is your xpath locator empty?

On Thursday, July 26, 2012 2:28:22 PM UTC-7, Amar Gandhi wrote:
Hi,

We are using Safari 5.1.7 with Selenium web driver 2.24.1. I have successfully created Safari Web Driver Extension and able to launch Safari. Script is also proceeding ahead with certain link clicks initially but at some point while entering any value in edit boxes or selecting radio button it stops with below exception. By the way I am using xpath to identify those objects and when I Inspect Element in Safari Xpath is correct. ( Same code works fine in other browsers ).

driver.findElement(By.xpath("")).Click()


Error communicating with the remote browser. It may have died. Build info: version: '2.24.1', revision: '17205', time: '2012-06-19 16:53:24' System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_25' Driver info: driver.version: RemoteWebDriver Caused by: java.lang.IllegalStateException: Currently waiting on a command response

Thanks

Amar Gandhi

unread,
Jul 27, 2012, 10:38:37 AM7/27/12
to seleniu...@googlegroups.com
Actually that was just for a reference actual line of code is

driver.findElement(By.xpath("input#radiobutton")).click()

Thanks

Amar Gandhi

unread,
Jul 27, 2012, 10:40:15 AM7/27/12
to seleniu...@googlegroups.com
Just a correction

driver.findElement(By.xpath("//input[@id='radiobutton']")).click() 

Thanks


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/mtJrw1rAK1MJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Thanks
Amar

Mike Riley

unread,
Jul 27, 2012, 12:46:43 PM7/27/12
to seleniu...@googlegroups.com
The question was about your Selenium environment.  This error means that it is no longer able to talk to the remote server.  It has nothing to do with your findElement() statement, other than it can't talk to the server at that point.

Either your remote server or your grid server (if you have one) is not responding.

One issue I have had when debugging is that if you take to long between communication attempts with the server the sessions gets closed by the server.

Mike


On Friday, July 27, 2012 7:40:15 AM UTC-7, Amar Gandhi wrote:
Just a correction

driver.findElement(By.xpath("//input[@id='radiobutton']")).click() 

Thanks
On Fri, Jul 27, 2012 at 9:38 AM, Amar Gandhi <ama...@gmail.com> wrote:
Actually that was just for a reference actual line of code is

driver.findElement(By.xpath("input#radiobutton")).click()

Thanks


On Friday, July 27, 2012 3:17:21 AM UTC-5, Greg wrote:
It doesn't look like this is a xpath problem it looks like this is a selenium problem. What environment are you running in besides safari. Are you running headlessly? Also why is your xpath locator empty?

On Thursday, July 26, 2012 2:28:22 PM UTC-7, Amar Gandhi wrote:
Hi,

We are using Safari 5.1.7 with Selenium web driver 2.24.1. I have successfully created Safari Web Driver Extension and able to launch Safari. Script is also proceeding ahead with certain link clicks initially but at some point while entering any value in edit boxes or selecting radio button it stops with below exception. By the way I am using xpath to identify those objects and when I Inspect Element in Safari Xpath is correct. ( Same code works fine in other browsers ).

driver.findElement(By.xpath("")).Click()


Error communicating with the remote browser. It may have died. Build info: version: '2.24.1', revision: '17205', time: '2012-06-19 16:53:24' System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_25' Driver info: driver.version: RemoteWebDriver Caused by: java.lang.IllegalStateException: Currently waiting on a command response

Thanks

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/mtJrw1rAK1MJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Thanks
Amar

Amar Gandhi

unread,
Jul 27, 2012, 5:20:36 PM7/27/12
to seleniu...@googlegroups.com
I agree with you, but one thing is same script works fine for all other browsers ( IE, Firefox, Chrome ). For Safari as we dont have out of box support, I created Safari extension using Selenium 2.24.1. So after performing few actions script dies with given error in my email earlier.

To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/w_IZ_J7GaIQJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Thanks
Amar

Peter Gale

unread,
Jul 27, 2012, 5:34:31 PM7/27/12
to Selenium Users
> ... same script works fine for all other browsers ( IE, Firefox, Chrome ). For Safari as we dont have out of box support, I created Safari extension using Selenium 2.24.1.
 
So that would indicate that the problem might well lie with your own Safari extension.
 
You need to supply full details of everything relevant if you want meaningful help.

Date: Fri, 27 Jul 2012 16:20:36 -0500
Subject: Re: [selenium-users] Re: Safari Web Driver : Not able to identify Xpath
From: ama...@gmail.com
To: seleniu...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages