hemant-manwani / php-webdriver-bindings

Automatically exported from code.google.com/p/php-webdriver-bindings
0 stars 0 forks source link

There is no function which will return Xpathcount #34

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

I was writing a code for Auto generated drop down of Google search help 
functionality and want to print the related topic which will appear .

using Selenium Ide i can store the Xpath count in a variable and using loop i 
can easily print those but in this binding there is no such function which will 
return xpathcount.

What is the expected output? What do you see instead?

There should be a function which will return XpathCount

Please provide any additional information below.

 the code i have written  is attached . when i am trying to run this code  error is showing

Original issue reported on code.google.com by testerin...@gmail.com on 26 Feb 2013 at 1:12

GoogleCodeExporter commented 8 years ago
If using CWebDriverTestCase and the intent is to follow Selenium RC API, then 
yes, perhaps that file/class should implement a wrapper method getXpathCount().

But if we're talking about pure WebDriver, the WebDriver API itself offers no 
XPathCount functionality. The equivalent in WebDriver is:

$elements=$this->webdriver->findElementsBy(LocatorStrategy::xpath,"//*[@id='gsr'
]/table/tbody/tr/td[2]/table/tbody/tr[*]/td']");
$xpathCount = count($elements);

the advantage of the new WebDriver approach is that it no longer applies to 
just XPath count, it will work for elements by ID, classname, name, CSS, etc. 
by use of findElements.

I'll leave it to the core developers of this project to determine whether they 
want to "fix" anything here or not (won't fix).

I'll contribute a patch to CWebDriverTestCase if needed when I get around to it.

Original comment by manga...@gmail.com on 9 Mar 2013 at 6:31

GoogleCodeExporter commented 8 years ago
By the way, what error do you get, you didn't mention...

Original comment by manga...@gmail.com on 9 Mar 2013 at 6:32

GoogleCodeExporter commented 8 years ago
Hi

Thank you for reply.

I was getting error related to object not found., but later i found that it
was happening due to the speed at which test was running,  so when i use
sleep function before the            findElementsBy function the problem
got resolve.

i have 2 more query regarding which function to use

*1  Like in IDE  we can scroll down the speed bar to low ,so that test can
happen in sloe mode from the start , is there any function in this binding
which can fix the speed to slow from the beginning ?*
*
*
*2  is there any function which will scroll the screen , so that more
records can load , like facebook friendlist page, if we scroll friends are
getting listed .*
*
*
*
*
i am not able to get any help regarding these two , neigher from google nor
in your library . please help.

Original comment by testerin...@gmail.com on 9 Mar 2013 at 1:21

GoogleCodeExporter commented 8 years ago
Sorry, I can't help you with your other queries. Try the Selenium Users group 
on Google group if not already: http://groups.google.com/group/selenium-users.

Closing out issue then since it's been resolved.

Original comment by manga...@gmail.com on 9 Jun 2013 at 7:30