Hot answers tagged

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 ='']//...
user avatar
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 ...
user avatar
  • 51
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(&...
user avatar
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....
user avatar
  • 685

Only top scored, non community-wiki answers of a minimum length are eligible