2
votes
Accepted
Selenium Webdriver : Trying to get text, but specific class present
Based on the information you shared, I was able to get the Transaction Number with this line of code:
driver.findElement(By.xpath("//span[@class='status-success' and @data-v-5d062b04 ='']//...
1
vote
Is there any way to trigger before Method only for specific test methods
You could create another method that does not have the @Test or @BeforeMethod/@BeforeTest tags and then just call that method within the tests themselves.
Or
You could use the @DataProvider tag to ...
1
vote
Selenium : webdriver.Chorme() function problems
The error you are getting is
FileNotFoundError: [WinError 2] Impossibile trovare il file specificato
My guess is, this is because of this line,
web = webdriver.Chrome("C:\ Users\giova\Desktop\...
1
vote
Accepted
Element is not clicked even after explicit wait
In the HTML bit that you have shared in the question, there is no <li> element (//li[@role='option']).
Hence this line threw error for me:
WebElement defaultValue = driver.findElements(By.xpath(&...
1
vote
Accepted
Getting value from data-value (webdriver selenium / java)
QA automation engineers face this issue while automating user interface testing scenarios.
Below is the code that can be used to fetch the value of data-val="9":
String text = driver....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
selenium-webdriver × 6407automated-testing × 1756
java × 1155
selenium2 × 543
python × 425
c# × 393
browser-automation × 322
xpath × 306
testng × 288
javascript × 191
test-automation-framework × 156
page-objects × 154
chromedriver × 152
appium × 102
protractor × 97
selenium-ide × 97
cucumber × 90
firefoxdriver × 76
eclipse × 74
junit × 71
selenium3 × 67
jenkins × 64
chrome × 55
selenium-webdriver-c# × 55
ruby × 49