Tag Info

New answers tagged

1

Personally I would put a wait and in the wait try to click and then verify the popup exists, catch the error and try to click and verify again. That way as soon as it's ready it will return and you aren't using a timer. That is good practice anyway to not just wait a specific time, but wait for a particular event to take place and then move on. c# ...


2

Try this , storing all the Web elements of Select list in a List and then getting its size. List<WebElement> optionCount = driver.findElements(By.xpath("//select/option")); System.out.println(optionCount.size()); Thanks.


0

There are perhaps three reasons why this might fail: The page hasn't finished loading, so the element isn't there The page has finished loading, and the page simply doesn't contain the item -- perhaps because you spelled it wrong in the test or the developer spelled it wrong in the code The page contains embedded frames, and the element you seek is in an ...


1

Suggestion: Every test automation shall run in a dedicated environment, dev code/script/db changes shall always auto deploy to this environment, automated test shall only run here. With such design the team can easily design the automated test an test data as well. After each success test execution, restore the whole db.


0

You can start learning WebDriver. Selenium IDE is used to make your job easy in writing code. Selenium RC is older version of selenium which is being rarely used. So I would suggest learn webdriver and once you are comfortable with it, use Selenium IDE.


4

That partially depends on what you want to automate. From the front page of SeleniumHQ (my highlighting): If you want to create quick bug reproduction scripts create scripts to aid in automation-aided exploratory testing Then you want to use Selenium IDE; a Firefox add-on that will do simple record-and-playback of interactions with ...


1

@logician: Please go through this link seleniumhq here you will get all the information. And to automate take any web application.


0

To select a value from a dropdownlist or multiselect using Selenium, you will have to use the Select function instead of trying to click on the element. example: Select dropdown = new Select(driver.findElement(By.className("appt-dropdown-menu"))); dropdown.selectByVisibleText(Facial); but as Mutt pointed out, the html code you have given does not ...


1

First: You have md5 encrypted passwords. When it is theoretically no way of decrypting md5 encrypted password there is a way to decrypt a MD5 hash, using a dictionary populated with strings and their MD5 counterpart. As most users use very simple passwords (like "123456", "password", "abc123", or in your case 's'), MD5 dictionaries make them very easy to ...


0

I am getting error as -element not visible: is the element visible? Selenium can't interact with invisible elements. If it is visible, you can do something like: driver.findElement(By.xpath("//span[@class='appt-details-dropdown-service-title']")).click();


0

When you use driver.getPageSource() it gives you entire page source. To be more efficient, use something like this: WebElement element = driver.findElement(By.xpath("//*[contains(.,.)]")); return element.getText.contains(data);


0

It depends on what your tests are actually testing. "functionally" it should behave similarly, however alot of the variation is with browser/javascript/other component interactions. Headless would allow the functional test, but not guarantee the variations introduced with different platforms/browsers. When you add another third party like x virtual it ...


0

try the following: c# IWebElement dropDown = WebDriver.findElement(By.css("select name='tblCampaigns_length']")); SelectElement select = new SelectElement(dropDown); select.selectByIndex(select.Options.Count - 1); The .Options retruns a list of options that then inherits the .Count in being a list. This will return the exact number of option elements ...


0

From the answer of @Bob Dalgleish you can see that output of Selenium IDE is quite hard to use. get XML, transform it with XSLT and Perl? No thanks! IDE is useful to show locators, but test it generates are too linear and will repeat big chunks of code, as if they were copy-pasted. So if any change is made, chances are exactly the same change will need to ...


0

I used the Selenium IDE extensively on my last project. I had a suite of tests in a test domain specific language and a translator that created Selenium IDE test suites. When I left the project, there were more than 700 tests in the suite. a) The test DSL was originally written in XML, based on a number of other test DSLs I had created for other projects. ...


0

Yes, you can do validations using either verify or assert. Check this documentation which will give you a clear idea - http://docs.seleniumhq.org/docs/02_selenium_ide.jsp For complex automation, you need to use Selenium WebDriver which gives you flexibility to code.


1

1.In eclipse i have executed the tests they are working fine, how i have to execute them in production server? Your tests can run in every environment. You can have a Selenium Hub and many VMs with different operating systems and browsers. But for the beginning the tests can also run from your local computer. You can choose against what environment ...


1

I think a space in the name attribute is not valid. ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). http://www.w3.org/TR/html401/types.html#type-name So I assume Selenium do not handle invalid HTML.


0

In watir, this can be accomplished in one line: browser.select_list(:id=> 'id').options.count


0

Using Watir you can select by index as follows: browser.select_list(:id=> 'month_of_birth').option(:index=> 0).select In this case we are selecting the first option at the top of the drop down list. Also if you want to count the number of options there are then you can do: browser.select_list(:id=>'month_of_birth').options.count You can use ...


0

try this, Select s = new Select(driver.findElement(By.id("#id"))); List<WebElement> list = s.getOptions(); There you have all the elements of your dropdown, and using the size() method you'll have all the options.


0

Here is the method I use to take screenshots using webdriver: private void takeScreenShot(EPropertiesNames path, Integer... screenID) { File directory = createFolder(path); try { // Toma la captura de imagen File imagen = ((TakesScreenshot) accesoWeb.getDriver()).getScreenshotAs(OutputType.FILE); StringBuilder sb = new ...


-2

I've had great success with holmium.core http://holmiumcore.readthedocs.org/en/latest/


0

As mentioned before, Applitools Eyes is a service which does exactly that. No more pixel comparisons and histograms and thresholds. Applitools have proprietary algorithms which analyse the screen and determine whether a screenshot matches the baseline. And they do a very good job at it. If you really want, you can also set a "human" level for comparison, ...


0

Check out this tool https://github.com/NaviNet/Robot-AppEyes - a Robot Framework library that uses a cloud based provider to perform the 'human eyes' visual verification part. The expected results / baselines are set using a Web GUI it even allows for verification of a region based on its element locator - this I found very cool! Anyone using ...


0

I must not agree with that: "The most efficient tool for testing the appearance of a website is still the human eye and brain." The most efficient way to do comparison of screenshots, whether it is of web pages, or 1000's of cups falling out of a plastic mold in an hour, on some factory, or anything else is by a software/machine. For industry purposes there ...


0

If you can, talk with the developers. They could quickly develop something like this: If test environment, than accept a specific input oft the captcha; else accept only the real solution of the captcha. In the most cases exist a config file for things like that. Keep in mind, that captchas exist to prevent automation. So I think you has no other option.


1

In your test environment, you need your developers to enable some way of bypassing the captcha. You need to make sure that is only available in your test environment. There are a lot of ways of doing it, commonly it is you typing in a specific string that is recognized by the system to bypass it.



Top 50 recent answers are included