Tag Info

New answers tagged

0

The possible reason might be that page looks to be rendered (UI elements are in place), but not completely loaded in browser. If there is any background calls, especially to 3rd-party services, it might take a while to reach them and get response, only then browser is able to mark the page as finally loaded.


0

I had similar issue and it was because of permission. So try to run the script with sudo command. Hope it helps


0

The command should be: captureEntireScreenhot which is available in commands and the target should be the address of the folder where the screenshot is to be saved. This has to be written manually.


0

InternetExplorerDriver has had issues in the past with getting coordinates inside frames; the issue I found claimed to be resolved, but for a simpler use case, whereas my page uses a lot of frames. A workaround that clicks more reliably: JavascriptExecutor executor = (JavascriptExecutor)driver; executor.executeScript("arguments[0].click();", ...


2

Try this Driver.SwitchTo().frame("Fancybox-frame"); Driver.findElement("enter your xpath to close popup").click(); Driver.SwitchTo().defaultContent();


-1

how to use the same Xpath for to pop ups


0

Have you tried finding element again right before you click it, instead of lazy loading it? I don't know how lazy loading works, but it seems the element stored in bttnSubmitSearchBySize is not the element you want. bttnSubmitSearchBySize = driver.FindElement(By.Id("bttnSubmitSearchBySize")); bttnSubmitSearchBySize.click();


1

Try writing a method that you can reuse whenever you want to find a new web element, but that will timeout after a specific time. You want to try/catch all the WebDriver exceptions, not just Stale Element. Make sure to include a sleep time in the catch, or else the test will retry like crazy whenever a try fails. Here is an example: public static ...


1

We are using Xvfb in our Continuous Integration environment and it is working great. It's no problem to take screenshots from Selenium for later analysis when errors are found. We have found no problems with this solution, rather a great advantage to be able to use virtual servers to spawn massively parallel tests against installations of the software.


1

I have written a blog on how to take screen shots while using webdriver APIs, This is a basic code but it will help you in taking screenshots. http://apttest.in/how-to-capture-screenshot-in-webdriver-using-java/ package screenshot_package; import java.io.File; import org.apache.commons.io.FileUtils; import org.openqa.selenium.OutputType; import ...


0

Poll for the maximum acceptable response time. Decide the longest response time you are willing to accept. Then poll for that long. Set your poll timeout such that: You cannot accept a longer response time, even if the element were to appear on the next poll cycle. You can accept a shorter response time, no matter how grudgingly. I like to be generous ...


0

I don't know of an open-source solution, but since I use MailChimp for sending the emails, I know they offer a tool called Inbox Inspector which simulates what the email looks like in different clients. It also might be worthwhile to set up an email account that can be imported into multiple clients using pop3 integration. Then, you could send the email to ...


0

If this is for Java then why not use this project? https://code.google.com/p/fighting-layout-bugs/


1

There is nothing wrong with documentation. Need to specify page object classes as public classes.So moving GoogleSearchPage to different file and specifying it as public class should work fine. the way suggested here is also correct but is just an alternative.


1

It looks like this may be a bug with selenium - see https://code.google.com/p/selenium/issues/detail?id=3734. There are some workarounds in that thread, but I would suggest to perhaps instead of building an action chain like this, specify the click method with a keydown modifier. So you can Actions click1 = new Actions(driver); ...


-1

I believe this link will be helpful for you. Date Picker Thanks


0

I would recommend using a WebDriverWait along with one of the methods in the ExpectedConditions class. Basically, just wait for a element on the page using a pre-defined expected condition.


3

Yes, you can run headless with either Headless Chromium or with PhantomJS .. Keep in mind that running with Selenium Grid or SauceLabs is equally as good as running headless.


0

Netbeans and Eclipse, you know, they are just an IDE. As far as I know, both of them do not have any official plugin(s) for Selenium, so I agree there isn't any difference. Anyway, consider your experience, I suggest Eclipse for you, because you can find plenty of blogs/web pages(etc.) to help you write test class.


2

It doesn't make much difference in terms of the development or scripting. But I prefer eclipse because netbeans tends to occupy a lot of memory and lower system performance. It seems to hang after a couple of hours. In that sense eclipse is more stable than netbeans.


1

Sometimes it so happens that the wait commands do not work. Instead of the wait command of selenium try using Thread.sleep(); command of java. This command will pause execution of the script for the given time...


0

If you're referring to an alert: driver.switchTo().alert().dismiss(); That will dismiss a JavaScript alert. If you're talking about a pop up that is a part of the application's functionality and it's not working in IE, that's a bug if you're supposed to support IE and that's up to the developer to fix. In any case, a pop up is usually dealt with using ...


0

Try to open this address in browser first to check server is up. Also another Web App can be launched or hosted on this address and port. Check Firewall settings, try to disable it and check the results.


0

How do you capture a screenshot using WebDriver or custom screenshoter ? May be the reason is in bad algorithm of getting screenshots after the test failures. Also you can try to update WebDriver to the newest version.


0

Try to upgrade to the latest IEDriverServer: 4.43.xxx: http://selenium-release.storage.googleapis.com/index.html?path=2.43/ Also you can try both x86 and x64 versions.


0

I found which line of code causes this behavior: @profile['modifyheaders.config.migrated'] = true Final variant: @profile.add_extension('support/add_ons/modify_headers-0.7.1.1-fx.xpi') @profile['modifyheaders.config.active'] = true @profile['modifyheaders.config.alwaysOn'] = true @profile['modifyheaders.config.openNewTab'] = true ...


3

PageObjects The code of automated test cases should be easy to understand and not too complex. If a test fails, we want to know why and this as soon as possible. To allow this exists PageObjects. PageObjects are classes that contains WebElements and every actions associated with those. A PageObject looks like this: class HomePage { WebDriver driver; ...


0

This should work: WebElement element = driver.findElement(By.xpath("//button[@class='btn' and contains(@onclick,'PopulateInvestor')]")); element.click(); The driver search for the element on this way element has attribute class and the value of this is btn element has attribute onclick and the value of this contains the string PopulateInvestor Maybe ...


0

It makes no difference. Both support JUnit and TestNG as testing framework. They also support Maven and Ant as build tools. In my view, all important things to develop automated test cases with Selenium 2 / WebDriver are present. My experience is, that NetBeans needs more time (just seconds) to start and use a little bit more memory. But seriously: it's ...


0

Have you tried to use WaitForReadyState? Here is my example: /// <summary> /// Waits the state of for ready within 30 sec. /// </summary> public void WaitForReadyState() { var state = string.Empty; try { var wait = new WrapperSeleniumWait(this, ...


1

True to edit user3783352's answer but got some permission error. So here is the content of the post referred to in that answer- package <Your Package>; import java.io.IOException; import java.net.HttpURLConnection; import java.net.URL; import java.util.List; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import ...


1

Selenium/Webdriver is a great tool, but it comes with some overhead you'll have to be prepared to manage. The first is choosing which Programming Language bindings you intend to use. Whatever that ends up being will be the standard for the project for a long time, and depending upon the level of person you hope to use to build it, it can impact your ...


0

How to take a screenshot in selenium webdriver 2 in MAC O/S Need to import-> package generic; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; @Test public void browserValidate() throws ...


0

If the pop-up window is part of the web-based app, that you are testing, you need to know why is only happening on FF and not on IE. There is a definitely a way on the settings on FF to disable pop up; however, IF in the future it is require to have pop-ups on your app, you will not have a user-oriented environment. Thus, I strongly suggest to not disable ...


1

Selenium is a tool to drive and verify behavior of web-applications, it should not matter where they are hosted. If you can reach the webserver running the application it can be local or hosted in the cloud, the application should behave the same. If you want to test if the cloud setup can handle a certain load and find its bottlenecks I would look at a ...


2

Although i do not have much idea about it but i think you can give selenium grid a try. I read on seleniumhq.org that with selenium grid you can create a master slave architecture, where one master machine will control several slaves to send request to a common server. Maybe this can help solve your issue!


1

The Keys points to consider while choosing an automation approach (Data Driven/Keyword based /Hybrid/) are as follows - Is the Application under Test - Data intensive ? - Better of with Data Driven approach then. Is the application more about functional tests (e.g. workflows) - Better to go with a keyword approach - specially if those functional tests ...


1

Gestures - User can perform multiple clicks on submit button / search button occasionally which could result in page reloads / transactions cancelled Image / Video Previews - Between transitioning between thumbnail and playback of videos I have observed not well automated Payment gateway timeouts - During peak transactions there could be timeouts with ...


2

As I know captcha (Some captcha you can test) you can not test using selenium webdriver.



Top 50 recent answers are included