New answers tagged

0

Whenever you enter anything in text input field, it will store value field in HTML. So if you want to retrieve the value entered in input field later in your program, then just use WebElement.getAttribute("Value");


0

In addition to the other answers, for me the most efficient way to take a screenshot when a test fails and attach to the report. (When using cucumber its easily done with the After hook) This way I can go to the CI, view the report and quickly understand what happened.


3

PDHide's answer is good in general, but since you specifically ask about verifying selectors, I would like to add that you can test them in a browser console. For CSS selectors, you can test with document.querySelector(selector); For XPath, you can test with document.evaluate(selector, document).iterateNext(); Each of these will return the first matching ...


-3

Most of the health product companies do testing in all browsers irrespective of the Operating System


5

1. Trust your code and doubt SUT (Software under test): If everything was working fine and the test starts to fail suddenly. Instead of debugging your code for issues, start with checking the actual product. Do some visual inspection and see whether the development team has modified the element or the element is no longer being displayed. 2. Trust your ...


0

First of all, we need to understand the root cause of the exception. As written in the Selenium docs, it's thrown by FindElement/FindElements methods. That might be caused by: Invalid locator. In this case, you have to manually verify its validity on the page. Absence of element within the DOM at the moment of the FindElement call. In other words, your ...


3

You cannot test frontend using JMeter mainly due to its main constraint, as per JMeter project main page: JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In ...


0

Class and ID are auto-generating so I think that you should change xpath to contain (text(),'text of element') or anything that was fixed.


1

Check this official tutorial: https://docs.microsoft.com/en-us/visualstudio/install/install-visual-studio?view=vs-2017 Pay attention to Step 4 where you should select Desktop Development item in order to be able to develop desktop command line applications.


1

Hi are you validating spinner to be visible first ?, _wait.Until(ExpectedConditions.visibilityOfElementLocated(LoadingSpinnerBy)); sometimes spinner takes time to be displayed, and by that time your invisibility condition will be true. So you will have spinner being displayed in the next step The correct approach would be to: validate that spinner is ...


1

When you use xpath that is to locate nested elements you have to start your query from .. Like String query = ".//*[contains(@resource-id, 'delivered_indicator')]"; https://selenium.dev/selenium/docs/api/java/org/openqa/selenium/support/ui/ExpectedConditions.html#presenceOfNestedElementLocatedBy-org.openqa.selenium.By-org.openqa.selenium.By-


0

If your goal is just to click button_2, you can use javascript click which will click the element even it is not displayed but it's present. DriverUtils.getDriver().executeScript("arguments[0].click();", elem); But it you really want to wait for the spinner first you can have: public void WaitForLoadingSpinnerToGo() { try { _driver....


0

You can use Talend to write a job that compares a DB to a file. See this video for an example of what Talend can do. You can use the tJoin component to check for data matches.


0

All steps don't work for me, but I have another solution, I just right click adb.exe then go to the previous version. Then problem is solved (for me). If your adb properties dont have previous version in history, try my adb.exe(remember to backup your adb.exe) Here my adb.exe : https://www.dropbox.com/s/3o12o2nz2fvhr87/adb%2019.10.2014%20work%20Lacuk001....


1

I had some problems connecting Appium with iOS devices using Appuim Desktop. My solution was to change Appium Desktop to Appium Studio. Appium Studio makes is easier to work with Apple devices.


1

MicrosoftWebDriver.exe is the Edge driver, not IE driver. As others have mentioned the IE driver is called IEDriverServer.exe. As an example of a launcher for IE: System.setProperty("webdriver.ie.driver", "C:\\DriverFiles\\IE\\x32\\IEDriverServer.exe"); // custom stuff IE needs in order to work (some only needed for Win10+) DesiredCapabilities ...


1

WebDriver is a way to automate browsers, it doesnt really matter which language binding you use to implement WebDriver testcases, it is possible with all languages (e.g. C#, Python, Ruby, Java, JavaScript, etc..). All web applications use HTML, CSS and JavaScript. So it is all the same. Protractor makes it easier to automate an application developed in ...


0

Resulting test dataset size is on average 1 000 000 rows in about 20 tables which have about 10 columns each. You are dealing with two different concerns: The calculations are performed by Interactors by manipulating Entities. For checking these calculations, you can use any unit testing libraries to exercise these objects and use your test data set. ...


0

i raised a similar protractor issue on this , the issue seems like if you give a input say "one" to textbox 'A' then you clear text box 'A' and then sends input to textbox 'B' and then sends input say "two" again to textbox 'A', A will get the value onetwo If you immediately use sendKeys after using clear() , everything works fine. if you give an input ...


0

You could use the GMail Google API. This is working fine and sort the problem that was similar to what you have described. You just need to create an account and enable the api for it. Please refer to the link below for the complete guide: https://medium.com/@ciocegiusepp/go-automated-test-can-check-email-7e80332bf062


0

Anytime I see 'experimental options' I'm leery to give an answer, but it looks like you're using ChromeDriver in an enterprise environment that doesn't allow for the installation of extensions to the browser. I had the same issue and turned off extension like you have and it got around the problem. There are registry changes you could make as well to allow ...


0

It seems that your Select element is one level above the thing you are capturing, try using xpath of the View above your ImageView


0

I will suggest a possible path for some folks in this situation. This may not work for all situations. Plan for the future, don't just repeat the past If you simply convert the manual cases to automated ones you will solve one problem but create others. You will reduce the need for manual testing but you will: Introduce the need for quality engineer to ...


0

You can include the required test method name under the methods tag as shown below. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd"> <suite name="Suite"> <test thread-count="5" name="Test"> <classes> <class name="testNG.Event"> <...


2

Finally, this solution works for me -- Instrument the Istanbul.js. Use Command - istanbul instrument test.js >> test-instumented.js Now, use the below code in @AfterClass annotation. It will execute the below method after all tests. 4. Now, we have coverage.json. Crete a HTML using coverage,json using istanbul report.


0

You can use Istanbul to instrument front-end code for code-coverage. Process looks something like this: Start application with code instrumented by coverage tool Run the Cucumber/Selenium tests against web-app instance Generate report of with coverage tool This article describes how you can use Istanbul to generate code-coverage from UI tests. This ...


1

There are some AI solutions that can auto fix selectors. I am not yet really sold on it, but might be worth researching. I would try to create a common model between the UI code and the test page objects. I have never actually done it, but I think this is the way togo. Simple example would be putting the label text of buttons in an central class and let the ...


2

Share a Page Object Identification File, or service, or database table, etc. If necessary add converter(s) to the format either party needs. This will heavily encourage opinions, discussion and compromise... and the payoff is to achieve the overall goal and reduce (mostly eliminate) the current issue of locators being changed unknowingly from happening. ...


3

JDI Light framework aims to do just that - https://github.com/jdi-testing/jdi-light/blob/master/README.md Develop an automation framework based on AI that can identify and write correct stable PageObject automatically without engineers effort, generate smoke tests for application in seconds and some negative cases too. Run test execution automatically and ...


2

It's call TDD. ;) On a serious side, computers can only mimic inference - AI systems that impress us with apparent inference are still following an algorithm. A computer cannot understand what is the meaning of a check nor it can understand the meaning of change in the SUT. These two factors mean that a computer cannot understand how to change a check in ...


1

Try something like this: WebElement outerElement = driver.findElement(By.xpath("OTER_ELEMENT_XPATH")); WebDriverWait waiter = new WebDriverWait(driver, 100); WebElement innerElement = waiter.until(ExpectedConditions.elementToBeClickable(outerElement.findElement(By.xpath("./INNER_ELEMENT_XPATH"))));


0

I am not sure what you want to do, if you are able to extract the access_token then i believe that you know to use the test script session in postman Assuming you have the access_token stored in environmental variable swt: you can use the below code in the same post request after you have stored the jwt to variable: (Keep this code in "Tests" tab and not ...


0

I would suggest you to implement those unit tests. TDD is a way of making sure that your code/feature-implementations work as expected, even if it means legacy code. On the brighter side, adding unit tests might help you to find unexpected bugs, besides giving you the opportunity to refactor your code. Keeping in mind the practical side of the argument, the ...


2

These seems to be fundamental WebDriver Python questions, maybe you should think about following an online course first. I like the trail and error approach, but as you can see your questions get downvoted, because they are so basic. Be sure to check the documentation of the WebDriver Python API: https://selenium.dev/selenium/docs/api/py/index.html ...


1

I'll consider XPath. It seems you'd need to use text() as well: //span[@class="filtervalue" and contains(text(), "Search")] You don't need to use contains(), you can use just text()=, but it seems to me that the text value might change, so contains() might apply even after the change.


0

If you query the page source using selenium you'll actually get the source and not the DOM, so anything you do dynamically to the source code via JS will not be displayed in the output. Seleniums interactions though do actually access the DOM so using the returned page source as a metric for what is "visible" to selenium is problematic at least. If you'd ...


0

Turns out that JUnit 5 and JUnit 4 aren't completely incompatible with each other. So, for now, I'm using Assume from JUnit 4 (along with other stuff from JUnit 5). import org.junit.Assume; Assume.assumeTrue(HOME_PAGE.contains("ekwaqua")); It's ugly, I don't like it (and I will be very grateful for another, cleaner, solution), but it's working.


0

Use expect(page.has_css?('#div.error', wait: 3)).to be true If the expression is true (i.e. error exists) at the outset, it will return immediately, i.e. will pass. Otherwise, it will use a polling wait for up to 3 seconds to see if the condition changes. The difference between using fixed ('sleeps' or 'implicit wait') is they they will always wait and ...


1

Actually this question shows the lack of basic research from your side. Before learning a tool and technology, we should have a clear understanding of why we need it in the first place. In your case, you are trying to automate the login process for the tradingview webpage. So first understand what are the manual steps involved and then automate it: ...


1

The Trading View website has no login on that url. You could try to visit https://www.tradingview.com/#signin or click the Sign In button first. browser.get("https://www.tradingview.com/#signin") browser.find_element_by_name("username").send_keys("MYEMAIL") browser.find_element_by_name("password").send_keys("MYPASSWORD") browser.find_element_by_xpath("//...


0

This is the problem with negative assertions since Capybara has no way to know how long any actions are going to take on the page, so really can't know that even though the assertion is passing now you really want it to wait longer to make sure it keeps passing. What you really need is a positive assertion before the negative assertion to assure the page is ...


0

In modern applications to gain performance not all the content is loaded at once. Option I would suggest is. Can you scroll to the bottom of the page in the start and then try to find the elements? That way you can be sure that all the elements were loaded.


1

If you were not explicitly quitting the driver before and you are not doing that now as well then the change could be because of the change in below two areas Probably something in the logic of how you start/quit your driver and/or tests. Probably the change could be in the behavior of the application being tested. In my experience the issue you are ...


0

There are few ways to do it, but all of them are working as global variables in your test scripts. I agree also that there is no need to divide both tests you've mentioned into two classes. Altough if you must for some reason, then I would suggest to use Niels solution with GlobalDataStore or get familiar with TestContext which needs Cucumber in your tests (...


0

You have two commercial options: https://kinesis-ci.com Kinesis is a test framework that adds automated testing and continuous integration capability to your Tableau Server. https://www.datagaps.com/bi-testing-tools/bi-validator/automate-tableau-testing/ BI Validator makes use of our patented ELV Architecture to automate BI Testing. It supports ...


0

I am using data provider in each class and iterating the TestNg process. I can't upfront store the URL's because they are dynamic. There is a flag set in db for which scripts needs to be run, SO, I am retrieving the data of all the URL's having the flag set along with credentials and putting them in the result set, I am sending it one after the other to ...


2

When querying Android apps with Xpath there is no id attribute. There is a resource-id attribute instead. Appium is doing work behind the scenes to still provide By.id as a locator despite this. By.xpath("//*[contains(@resource-id, 'read_indicator')]"); If you don't use contains here, you'll need to put in the full resource-id, which is very long. Your ...


4

Measuring test effectiveness is a great question. So many in our industry focus on "Tests, number of tests, how long they run, how often they fail", all without looking at the key question "How effective is my testing?" In order to evaluate tests, start with the business value. Ask questions such as: What is the software release cycle? Once every 6 ...


0

The Cypress documentation shows examples how you can use should() to verify elements are enabled/disabled: https://docs.cypress.io/api/commands/should.html#Assert-the-checkbox-is-disabled cy.get(':button').should('be.disabled')


3

Although this question has been asked two years ago, it is still a current topic. Regarding payment; money does not really affect the motivation of people (see: Harvard Review ) So I wouldn't raise salary just to motivate people.. But based from our projects experience we faced the same situation as you. We got unmotivated testers. Hence we reflected the ...


Top 50 recent answers are included