Hot answers tagged

1

String response =RestAssured.get("https://praveendvd.free.beeceptor.com/test"). then().extract().response().asString(); JSONObject jsonObj = new JSONObject(response); int val = (jsonObj.isNull("priceTwo")) ? 2:jsonObj.get("priceTwo"); vehicle.setPrice(val); you can directly pass without ...


1

// GIVEN that I am an anonymous user on the Instruct Counsel page driver.get("https://www.lexology.com/instructcounsel/find"); // WHEN I press the Example button driver.findElement(By.xpath("//div[@id='do-example-search']/button")).click(); driver.get should wait for the page to load, but that doesn't mean the button is ready to be ...


1

there is a best practice when "There are good practices in context, but there are no best practices." When you first create the LoginPage object, it has the context of the first landing on the page. It may have loaded internal information relevant to this first landing (which the tests don't need to know). When you perform login and logout and ...


1

ChromeOptions chromeOptions = new ChromeOptions(); String proxyadd = "176.9.119.170:8080"; Proxy proxy = new Proxy(); proxy.setHttpProxy(proxyadd); proxy.setSslProxy(proxyadd); chromeOptions.setCapability("proxy", proxy); WebDriver driver = new ChromeDriver(chromeOptions); There is a proxy class that can be used to set proxy including ...


1

try List<WebElement> list = driver.findElements(By.tagname("option")); list.get(<index number of the selection>).click();


Only top voted, non community-wiki answers of a minimum length are eligible