kotoj
  • Member for 5 years, 10 months
  • Last seen more than 1 year ago
  • Warsawa
Are other classes able to access the webdriver instance when extending test base class? Getting NullPointerException Error
Accepted answer
3 votes

Agree with @Dale Emery. Use this code: public class WatchTV { WebDriver driver; WebDriverWait wait; int waitseconds = 60; public WatchTV(WebDriver driver){ this.driver = ...

View answer
How to count rows in GridView using webdriver c#, how to translate the existing protractor script to c# webdriver
Accepted answer
2 votes

To translate your protractor script use the same css selector: int searchResCount = driver.findElements(By.CssSelector("#resultsRepeaterGrid tr[class="row"], tr[class="altrow"]")).Count;

View answer
How to identify element with knowledge of partial text for any tag (eg. div,span etc.) contains?
2 votes

You should use xpath. If your text 'IPS' is the text inside tag use this: //*[contains(.,'IPS')]. If 'IPS' is for example part of @class atrribute use this: //*[contains(@class,'IPS')]. If 'IPS' ...

View answer
What is the difference between Priority and Depends on Method in TestNG?
2 votes

Yes, you can write multiple methods with the same priority (quite similar to not use any priority - all methods has the same default priority). About dependsOn annotation in a few words: ...

View answer
Check Box check and Uncheck using selenium web driver
1 votes

The simpliest way is using CSS selector instead of xpath in this case. driver.findElements(By.cssSelector("input:checked[type='checkbox']")) should return the list with all selected checkboxes. ...

View answer
Element is not clickable(x,y) even there is no scroll in page
1 votes

If you want to implement dynamic wait, try this: WebDriverWait wait = new WebDriverWait(driver, 30); wait.until(elementToBeClickable(By.xpath(".//*[@id='header2']/nav/div/ul/li/a"))).click(); ...

View answer
Element is not clickable at this point. Other element would receive the click
1 votes

Using xpath or css doesn't matter in this case. First of all find the element which would receive the click (@id='vtASRSettings_incompletetimeoutDiv'). If this element disappear afer some time just ...

View answer
For Mantis, can the DEFECT TYPE field be displayed in the grid?
1 votes

Is 'Defect Type' custom field? If is, read this topic, it should help: https://www.mantisbt.org/forums/viewtopic.php?f=4&t=8621 (I'm sorry I have no enough reputation to comment)

View answer
Firefinder doesn't find element but Firebug or Selenium IDE do
Accepted answer
1 votes

I found the solution myself. As it turns out, elements I wanted to find was inside iframe tags. Iframe is like second inner document, but xpath can work only on 1 document. I used driver.switchTo()....

View answer
How to test the multiple test cases in a single test case using selenium webdriver
0 votes

You should use one of test framework. If you use Java I recommend to use TestNG. Then you can use assertion (e.g. Assert.assertTrue(yourCondition, message) for all fields, it depends on test case and ...

View answer
How to find the element for below code in WebDriver?
0 votes

Use this xpath: //div[@class='ViewMenu' and text() = 'Videos'] because class selectedViewMenu is probably only when element is selected.

View answer