Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 31745

XPath (XML Path Language) is language for addressing parts of an XML document, designed to be used by both XSLT and XPointer. It also provides basic facilities for manipulation of strings, numbers and booleans. XPath uses a compact, non-XML syntax. XPath operates on the abstract, logical structure of an XML document, rather than its surface syntax.

0 votes
2 answers
2k views

How to get the number of buttons within a div using webdriver?

count = Counter; } System.out.print("############################################# " + count); } catch (Exception e) { } return count; I have declared xpath
Syrus's user avatar
  • 1,197
0 votes

How to get the number of buttons within a div using webdriver?

There was a little mistake I had done also did a little change in the xpath. First change the By.className to By.xpath Then changed the xpath as "//button[contains(@class, 'btn btn--05 thm--01')]" …
Syrus's user avatar
  • 1,197
3 votes

How to identify the web-element for a Text Box using Selenium

Most probably this occurs because of the execution speed. The code executes before loading the page. Therefore when the code looks for an element with the id='Department_input' it cant find such eleme …
Syrus's user avatar
  • 1,197
1 vote

How to solve java.lang.NullPointerException error in button click event?

I found the solution to the problem. I just had to add single line of code to make this work. MyClass object= PageFactory.initElements(driver, MyClass.class); I had to add this c …
Syrus's user avatar
  • 1,197
3 votes
2 answers
76k views

How to find a button using both xpath and button text?

What I want to do is capture each button using its text (Buttons have different texts) and xpath of the div. …
Syrus's user avatar
  • 1,197
1 vote
4 answers
3k views

How to solve java.lang.NullPointerException error in button click event?

When debugging I could find xpath is not passed to the button. Then I tried giving xpath in the same place where click event is called using driver.findElement(By.xpath.....). … // Here NewButtton doesn't contain any xpath. …
Syrus's user avatar
  • 1,197
0 votes
1 answer
932 views

Verify and Assert functions does not work as expected in Selenium IDE?

For target elements, xpath is given. Same xpath is used to fill data into the field. But when try to assert or verify, the element is not recognized. How should I fix this? …
Syrus's user avatar
  • 1,197