New answers tagged

0

Webdriver.js example This works where for example, I do an action that scrolls the user to somewhere else on the page. It checks that the upper left corner of the element that wasn't in the viewport before, now is in the viewport after the click or however you choose to use it. I am not trying to make sure the element square fits perfectly in the ...


0

You get a string, and you know what that string should end with. There is https://docs.microsoft.com/en-us/dotnet/api/system.string.endswith?view=netframework-4.8 You can use that, it's probably enough. If you know the allowed variations of Business Address 1: then you can remove those from the string. Maybe you know that your answer should always be after ...


1

Alternatively, We need to import atleast the following packages: from selenium import webdriver # for webdriver from selenium.webdriver.support.ui import WebDriverWait # for implicit and explict waits from selenium.webdriver.chrome.options import Options # for suppressing the browser In the program: option = webdriver.ChromeOptions() option....


3

This is going to be blunt. I don't know a not-blunt way to say this. First, learn to code. Working with Selenium, no matter what your toolkit happens to be, is writing code. If you don't understand the code or the principles behind the code, you will be constantly frustrated, and worse, you will irritate your peers with what will seem to experienced coders ...


2

You should consider: Which language to pair it with How to immediately integrate with CI How to approach naming identifiers, i.e. page objects What language application developers use (for pairing) How to handle timing issues and intermittent failures well Whether to use a js approach such as Jasmine, Jest, etc. for some/all tests Whether to use Visual ...


0

Try this solution. Works perfectly in Google Chrome dev tools console.


0

You can retrieve all inner text of <p class="details-info-block__text"> and then parse out the required text using String-related toolset of C#. It will be quite a tricky thing to extract what you want using selenium since the latter piece of text is a separate "naked" text node in a DOM and Selenium cannot parse it to a dedicated WebElement (anything ...


0

Just in case the earlier solution using the JavascriptExecutor does not work, use; try { boolean imagePresent = (Boolean) ((JavascriptExecutor) driver).executeScript("return (typeof arguments[0].naturalWidth !=\"undefined\" && arguments[0].naturalWidth > 0);", Source); if (!imagePresent) { System....


0

You can check size of an element with: driver.findElement(By.cssSelector(".example css[selector]")).getSize();


1

Hi @Forumqaa Below code may help for you. Please change the logic as per you. public class Sac { public static void main(String[] args) throws IOException { Sac s = new Sac (); s.getData("TC_001"); } public ArrayList<String> getData(String testCaseName) throws IOException{ ArrayList<String> a = new ArrayList<String>(); ...


Top 50 recent answers are included