checkElementUsing

public void checkElementUsing(By element, String message) throws IOException { try { assertTrue(isElementPresent(element)); System.out.println(message); } catch (AssertionError e) { message = message.contains(“is displayed”) ? message.replace(“is displayed”, “is not displayed”) : message.contains(“is disabled”) ? message.replace(“is disabled”, “is not disabled”) : message.contains(“is enabled”) ? message.replace(“is enabled”, “is not enabled”) : message.contains(“is not enabled”) ? message.replace(“is not enabled”, “is […]

checkElementUsingXPath

public void checkElementUsingXPath(String element, String message) throws IOException { try { assertTrue(isElementPresent(xpath(element))); System.out.println(message); } catch (AssertionError e) { message = message.contains(“is displayed”) ? message.replace(“is displayed”, “is not displayed”) : message.contains(“is disabled”) ? message.replace(“is disabled”, “is not disabled”) : message.contains(“is enabled”) ? message.replace(“is enabled”, “is not enabled”) : message.contains(“is not enabled”) ? message.replace(“is not enabled”, “is […]

Link

Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output

The Automation scripts fail to run on the latest Firefox version 38.0.5. The error is “Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output” Resolving the issue: Update the selenium jar file to selenium-server-standalone-2.46.0.jar. The new version of firefox 38.0.5 is not supporting old jars of selenium. Download both […]