Kshetra Mohan Prusty
  • Member for 6 years, 3 months
  • Last seen more than a month ago
  • Bangalore
Can we replace everything with automation or do we need manual testing?
5 votes

This is a pretty straight forward question. I think everyone will agree to this: Is manual testing necessary ? --> A must Can we replace everything with automation ? --> Mostly NO. When it comes to ...

View answer
not refreshing database in Selenium test
3 votes

Selenium doesn't work on databases. The below link describes selenium in extensive details. https://w3c.github.io/webdriver/ Coming to the problem you are facing, the solution lies in your problem ...

View answer
How to write unit test for methods with a large number of parameters?
3 votes

I can't think of a developer writing a method which takes 25 arguments. This is a terrible design. Practically your method should not take more than 3 arguments. OK, coming to a solution, in case ...

View answer
How should ImplicitWaits be removed without resulting in code bloat?
3 votes

If you really want to speed up your e2e tests, I don't think replacing all implicit waits by fluent wait will help that much. Instead, i would suggest exploring selenium grid or cloud based solutions ...

View answer
Unable to select element when element is in span than select Selenium c#
2 votes

The problem is the element you are working on is NOT embedded in a select tag, so you can't use Select class on that element. When you use a Select class, a check is made that the given element is, ...

View answer
C# Selenium - How to write a conditional statement with multiple elements/xpaths
2 votes

I am not a C# guy, I can help you with a basic idea how you can achieve this with pseudo-code, then you can translate the same in C#. Add all the check boxes to list. Loop thru the list to check ...

View answer
How to use multi dimensional array list in java?
2 votes

I would suggest model your GUI to a simple java class like below: override the equals and hashcode method use getters and setters to extract values at runtime. public class MyGame { Date gameDate; ...

View answer
How to reuse existing browser session, instead of opening new windows?
2 votes

There would be lot of development activity required to achieve this and I would not recommend this way of designing your test harness. However to give a glimpse of how it can be achieved, First you ...

View answer
Should unit tests tests the same variety of sad cases as UAT tests?`
2 votes

No. The two are completely different in their nature and have different intent all together. Unit tests only test the publicly facing APIs written in the development code. They are meant to be ...

View answer
What are the best ways to Automate JSON POST Request using Restassured API
2 votes

You need to apply the below areas to your framework: The body for the POST call should be coming from a model file. Use a java serialization/de-serialization library like jackson or Gson to achieve ...

View answer
Selenium forgets the authentication
1 votes

To add to the answer by @Klynt, although this is a solution, this is deprecated for browsers like firefox and chrome. In this approach, you don't really have expose your credentials. You can store ...

View answer
Selenium: How do I use the button of my HTML in WebElement?
1 votes

I think you are more aiming towards finding a correct locator for the desired button. You might consider using the below xpath: //form//input[contains(text(), 'Pesquisar')] in findElement by xpath ...

View answer
How to select list items using button in selenium webdriver?
1 votes

It seems you're looking at the upper hierarchy in the DOM. Try the below code; the intent is to click on the first index. driver.findElement(By.id("add_new_item_btn")).click(); // some explicit ...

View answer
Reading data from csv file
Accepted answer
1 votes

Your code would be throwing a Null when trying to access the element after the last valid element(in the while loop condition), which would be definitely null. What you can do in this case is wrap ...

View answer
How to change the pip version in pycharm
Accepted answer
1 votes

It might be because of the fact that pycharm and the system are using two different python virtual environments. You can fix it from 2 ends, either from pycharm or from the system version: depending ...

View answer
Can we Verify Contents on the browser PDF print in Selenium Webdriver?
1 votes

Selenium does not provide any API to verify the contents of a pdf. I am not sure which language binding you are using. However every language has its own specific libraries that help you achieve ...

View answer
Deserializing JSON response using RestSharp
1 votes

Assuming the de-serialized class for the json looks something like below, the way to extract "circuitId": "albert_park" is follows: The code is not C#, but this can give an idea. List<Circuit&...

View answer
Maximum how many lines in a java class file recommended?
1 votes

1800 lines of code is definitely not desirable. You need to refactor your class to separate the responsibilities. On a general rule, check the following Possibility of separating utility methods to a ...

View answer
Is there an open-source Selenium Webdriver Test Automation Framework that's already available in the market?
1 votes

This is a very subjective question. What you are actually looking for is a test harness. There are n number of libraries out in the market for the components you are looking for, e.g Logging - ...

View answer
How to get count of dynamic 'div's' nested inside a each 'td' tag?
Accepted answer
1 votes

Use below method template to get the number of div. public static int get_div_count_in_table(){ String _xpath = "//table//td[td_no]/div" ; List<WebElement> _divs = driver.findElements(...

View answer
Getting errors when running my first WebDriver script
1 votes

The code you have written might have worked if you would have used Firefox version lesser than 48 and webdriver 3. At that time firefox driver was implemented as a xpi based plugin; that was the ...

View answer
How can I implement functional, non-browser automation
1 votes

Your answer lies in a single concept, and that is Test Automation Pyramid. Below link explains that in detail. https://martinfowler.com/bliki/TestPyramid.html In short, a normal enterprise ...

View answer
Why driver.get() method is not recognized?
1 votes

Please add all the dependent jars to your project. You are getting the RED color in the method calls because the corresponding classes are not present in the project and JDK is not able to resolve the ...

View answer
Does implicitIwait affect set_page_load_timeout python, selenium, chrome driver
1 votes

I believe there is no such connection between set_page_load_timeout and implicitly_wait() as their intentions are different. implicitly_wait waits for an element where set_page_load_timeout has to ...

View answer
Should I test the created data after using Post Https Requests from Postman?
1 votes

Practically saying when you do end to end testing, we have to validate database after POST operation(NOT always) to make sure that the ORM layer works fine. If the question is YES or NO, then I ...

View answer
How to automate an app with a shopping cart that uses dynamic menus?
1 votes

The queries that you have are very subjective. Please provide some specific details. However you can try the below approaches. Identify the frequently changing areas in the page, try to find out a ...

View answer
Multiple @tests but did not execute the priority 2 and priority 3
1 votes

This is expected behavior, because there is a driver.quit() in the @AfterMethod. The purpose of @AfterMethod is it runs after each @Test method in a class. So the execution flow will be @...

View answer
How can I determine which Firefox profiles is used during a selenium test?
1 votes

Usually the remote end of the webdriver creates a new profile while creating a new session unless specified. If you are using a custom profile, then you must be passing the instance of the profile as ...

View answer
Why my code is not working when I click on the same button for multiple times?
1 votes

This is pretty simple. There is definitely synchronization issue. This is primarily due to the Component or page load strategy. The elegant solution to this could be have a explicit wait to check for ...

View answer
Couldn't find the x path of filter in selenium webdriver
1 votes

You are supposed to get UnexpectedTagNameException as when you try to create an object of Select class on an element, webdriver explicitly checks the tag-name, if it is not select(which is in your ...

View answer