New answers tagged

0

Simple ready2use snippet > Working perfectly for me static void waitForPageLoad(WebDriver wdriver) { WebDriverWait wait = new WebDriverWait(wdriver, 60); Predicate<WebDriver> pageLoaded = new Predicate<WebDriver>() { @Override public boolean apply(WebDriver input) { return ((JavascriptExecutor) input)....


0

The answer Peter Masiar gave no longer works. This answer will result in the following exception: Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 245, in get self.execute(Command.GET, {'url': url}) ...


0

I wonder how you even able to open the application? Because you have an empty space in side string many places. Problem #1 Change from : driver.get(" http://192.168.1.10:8080/sptest/home "); to : driver.get("http://192.168.1.10:8080/sptest/home"); Problem #2 Change from: driver.findElement(By.xpath(" .//*[@id='homeMainContainer']/div[1]/div/div/...


0

I think in first case, after you clicked loginenter button, it should be added some wait time to reload page so selenium driver can not locate the element. So I suggest you to add some condition to wait next element. Please try below codes; WebElement myDynamicElement = (new WebDriverWait(driver, 10)).until(ExpectedConditions.presenceOfElementLocated(By....


1

There is an documentation provided here by Balaji Muthukundan. This is not an official one but it is pretty detailed and systematic. I often refer this documentation for any help regarding Selenium API's.


0

Yes, it is possible. The following example is in Java: WebDriver driver = new FirefoxDriver(); driver.get("http://www.google.com/"); File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); // Now you can do whatever you need to do with it, for example copy somewhere FileUtils.copyFile(scrFile, new File("c:\\tmp\\screenshot.png")); This ...


0

I use this function with good results: static WebElement getElementsWithAlteratingNames(String PartialName, String Tag, WebDriver driver, String Attribute) { try { List<WebElement> Elements = driver.findElements(By.tagName(Tag)); String[] ElementStrings = new String[Elements.size()]; System.out.println(Elements.size()); ...


0

It will be difficult to maintain SeeTest automation using POM because if we declare all the paths like public static By launchpad_button = By.xpath("//*[@id='text']"); but the commands in SeeTest are like below driver.client.elementSendText("NATIVE", "xpath=//*[@id='text']", 0 ,"Testing"); So you need to add xpath again while using SeeTest commands ...


0

SetPageLoadTimeout is saying how long you want to wait for the page to load before the test fails. What you're after is waiting for an element to appear: WebDriverWait wait = new WebDriverWait(webDriver, timeoutInSeconds); wait.until(ExpectedConditions.visibilityOfElementLocated(By.id<locator>)); or wait.until(ExpectedConditions....


0

Yes you can automate it using BrowserMob Proxy. [Please use the below mentioedn link to test Network traffic using BrowserMob Proxy https://keshavtechinfo.wordpress.com/web-automation/selenium/web-page-load-testing-using-selenium-and-browsermob-proxy/ ]1


0

If you want to start with selenium ,I would mention some points what i followed during my initial learning of Selenium. First of all start learning any of the programming language concepts (i learned Java). Using Selenium IDE start finding the elements of web pages. Then try to make small scenarios for a particular functionality. Then try coding with ...


0

1) SelectByIndex Select select = new Select(driver.findElement(By.id("mobile-operator"))); select.selectByValue(index of the record you want to select ); 2)SelectByValue `Select select = new Select(driver.findElement(By.id("mobile-operator"))); select.selectByValue(value of the record you want to select );' 3)SelectByVisibleText Select ...


0

There are 3 ways from which you can select the value from the drop down 1) SelectByIndex Select select = new Select(driver.findElement(By.id("mobile-operator"))); select.selectByValue(index of the record you want to select ); 2) SelectByValue Select select = new Select(driver.findElement(By.id("mobile-operator"))); select.selectByValue(value of the ...


0

Just for anyone who stumbles across this question. The solution I have integrated into my environment is the following, and its quite easy. I have used the Build Flow plugin to create a Build Flow job. I have created 3 Maven style jobs, each job pointing to a different XML file which contain different test classes. In the Build Flow job I was able to add ...


0

You can use ExtentReport. You can use it to log your test steps and once its done it will generate a report to show your results. It will also show all fails and help you distinguish between assertion and an actually test fail. This is why we implemented it into our enviornment. Here is how to set up ExtentReports on your project with examples - http://www....


2

I'd take a look at http://caniuse.com/#compare=chrome+51,safari+9.1; that shows what HTML5 constructs Chrome/Blink allow that Safari (and hence webkit) don't. Also, according to http://phantomjs.org/supported-web-standards.html, Support for plugins (such as Flash) was dropped a long time ago. The primary reasons: Pure headless (no X11) makes it ...


0

According to JMeter Glossary: Latency. JMeter measures the latency from just before sending the request to just after the first response has been received. Thus the time includes all the processing needed to assemble the request as well as assembling the first part of the response, which in general will be longer than one byte. Protocol analysers (such ...



Top 50 recent answers are included