New answers tagged

0

That selector is positional based and likely to break as other emails pour in and/or the website updates its UI. Also, a .click() should "bubble" up from the to its parent <button> but we can target the button directly for interaction. I checked out the inbox and was able to successfully find the parent <button> of the 'Activate Your ...


0

Most of the professional software testing companies keep scope of their automation frameworks enough high to handle different types of such scenarios through wide variety of reusable locators and libraries. In this case, you can use 'Parent-Child relationship' concept in which, although your child xpaths(as mentioned) are same but as shown in DOM structure, ...


1

By selecting the correct approach of creating locators can make any automation framework more efficient. Xpath is one of the available options to locate any element in complex html web pages. With the help of XPath, tester can find the exact element by navigating through different hierarchies of web page. Like by using, any of these functions : Contains, ...


0

i tried this and it works. Managed to get 'Jessica' RichestPersonName = browser.find_element_by_xpath("//p[text()='3000']/preceding-sibling::span").text


0

Try this System.setProperty("webdriver.ie.driver", "C:\\Users\\Downloads\\Selenium\\IEDriverServer_x64_3.150.1\\IEDriverServer.exe"); InternetExplorerOptions options = new InternetExplorerOptions().setPageLoadStrategy(PageLoadStrategy.NONE); options.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, ...


0

You should use the preceding-sibling Xpath option: //p[text=()='3000']/preceding-sibling::span


0

The strategy mostly followed by the quality assurance services is to use the language inbuilt functions/libraries while automating similar scenarios. Here we can use ".split()" inbuilt function to break the string and then using index [1] or [2] to fetch the required text. We will be splitting the String at 'bubble'. There are 02 occurrence of '...


0

In software testing service you can achieve this using multiple ways. One of the way is as follow. Write a code in your class that implement 'IRetryAnalyzer' just as below. package com.mavericks.qa.RetryListener; import org.testng.IRetryAnalyzer; import org.testng.ITestResult; public class RetryFailedTestCases implements IRetryAnalyzer { private int ...


0

I have found the solution, We should change moveElement() to executeScript("arguments[0].scrollIntoView(true);", element) Here is the complete replacement: const element = await driver.findElement(...) await driver.executeScript("arguments[0].scrollIntoView(true);", element) await sleep(500); And sleep function: function sleep(ms) {...


0

While working in a testing company we are facing challenges on daily basis specially in automation. JavaScript is little bit tricky in playing those challenges. Please try the below syntax and try to fetch the elements. String script = "return window.getComputedStyle(document.querySelector('.btn.btn-sm.btn-outline-primary'),':after').getPropertyValue('...


0

I am wondering whether @FindBy annotation accepts xpath from properties or object repository file? No, As far as I know, java annotations only accepts constant values like string literals etc. So If you use @FindBy annotation, you need to put selector as a string literal like: @FindBy(css = "tbody[id$='some_css_in_here']") About second question ...


0

const hoverLocation = driver.findElement(selector); const actions = driver.actions({ bridge: true }); actions.move({ origin: hoverLocation }).perform(); Find your hover location, then you can perform the action over that location.


0

As per WebDriver Sampler documentation: Note: It is NOT the intention of this project to replace the HTTP Samplers included in JMeter. Rather it is meant to compliment them by measuring the end user load time. JMeter allows the creation of multiple threads, and each thread is responsible for creating load on the server. However, for the Web Driver use case,...


0

The easiest way to remove the error:: Cannot get a STRING value from a NUMERIC cell --> Go to excel --> Put an apostrophe at start of numeric data cell. When the code will run, it will consider the cell value as String and will not throw any such error.


0

For the table value put in something like "newline". Feature: Foo Scenario Outline: Bar Given ... When I input <value> Then ... Examples: | value | | 1212 | |newline| Then in the Step Definition just check for it. public WhenIInput(string value) { if (value.toLower() == "newline")...


0

Selenium is designed to write Functional and Regression test. Your requirement is to do the Performance test. Go with JMeter as mentioned @ToastMan answer. on top of it you can refer this blog https://www.blazemeter.com/blog/jmeter-webdriver-sampler to use the Selenium webdriver with JMeter if you are looking for selenium like UI while perform action in ...


1

Your machine will most likely not be able to handle 100 chrome browsers at the same time. I would suggest saving your excel file in CSV format and using jmeter instead. A simple testplan like this should be sufficient. User defined variables = URL and server info CSV Data Set Config = point at your CSV file Thread Group = controls the number of threads ...


0

You can try with below locators: xapth: //h4[a[contains(text(),'Load #')]] css: .load-number-link and you will get the collection of WebElements. Please use getText().trim(). You will get the text. After this you can use .split() method. This will split the text into an array e.g. {"Load #", "779999"}. There you can get it at index 1 ...


0

Landed here when looking for the answer but figured out myself and thought someone would benefit.


0

Replace this "//div[@class=' equipment_item']//text()[preceding-sibling::strong[text()='Load #:']][1]" With "//div[@class=' equipment_item'][preceding-sibling::strong[text()='Load #:']][1]"


0

Try this for Appium driver.getKeyboard().sendKeys("");


Top 50 recent answers are included