New answers tagged

1

You want your test script written in Java with Selenium Webdriver to automatically go through all the webpages in a website and verify a certain text/element. To do this you will first need to get all links from a webpage. You can use this piece of code for doing this, System.setProperty("webdriver.chrome.driver","./src/resources/chromedriver&...


2

If it's an externally downloaded script you can intercept the traffic and look for the file, it's easy with Puppeteer and less straightforward with other frameworks. See example here


3

Most programming languages support list of items and loops, some pseudo code: Create a list of websites/urls to visit (e.g. array) Start WebDriver Foreach url in list (e.g. a loop to go over each item in the list) Visit the page (e.g. driver.get(url)) Get the page source (e.g. driver.page_source) Check the page source contains something unique to the ...


0

The term you are looking for is visual regression but what it does is , it validates the image is exact match or close to the reference image ( as you can choose match threshold) , As it is matched with reference image css style change will fail the test because the image will ofcourse change so you cannot use that So in this case exhaustive testing is not ...


0

There are visual testing tools (such as Applitools, but I'm sure there are other cheeper options) that will take a baseline screenshot of the page and then will test against it. You can validate the look (either pixel-by-pixel, or just layout of the page, and some more options) and do that for a variety of screen sizes, browsers, etc.


0

WebElement Searchbox = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//span[contains(text(),'Search')]/ancestor::button"))); Searchbox.click(); webdriver wait returns the element , so don't find it before using wait . ALso change normalize text to text() or string()


0

What is testproject? Free Test Automation for All. Cloud Hosted, Community Powered. TestProject is a free end-to-end test automation platform for web, mobile, and API testing that’s supported by the #1 test automation community. https://testproject.io/ Benefits In built reporting Supports use as a step recorder ( simple recorder like IDE ) and also allows ...


1

use xpath or css css : [class="message-component message-button no-children pg-accept-button"] driver.find_elements_by_css_selector('[class="message-component message-button no-children pg-accept-button"]')[0].click() xpath: //*[@class="message-component message-button no-children pg-accept-button"] driver....


Top 50 recent answers are included