New answers tagged

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

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('...


1

From RestAssured docs, you can do the following: String json = post(URL_TO_CREATE_ENTITY).asString(); String id = from(json).get("generatedId"); // Or whatever is the name of the attribute with the ID Then you can make a call with this value: String urlToDelete = "{baseUrl}/api/product/" + id + "/deleteActivity" delete(...


0

Integration tests are saved in a separate source folder. These tests are different from unit tests in that they use real data and/or thirds party APIs. As a result they tend to be slower as they make network requests, perform database queries, and use large data sets instead of mocking data. This answer on software engineering stackechange goes into more ...


0

ProductResponse response = when().get("your-endpoint").then().extract().as(ProductResponse.class); Something like above would work. Not sure about this, but if RestAssured uses Jackson to map response to the beans, then you may need to add empty(default) constructors to your POJOS/POGOS.


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

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

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