Tag Info

Hot answers tagged

5

As @Niels van Reijmersdal mentioned, it makes sense to use the language in which you have local experts available. But you don't have to use the same language - use the language in which your team will be more productive. Python and Ruby are almost identical in expression power. I would argue that Python is more readable, which is significant advantage when ...


3

To play a devil advocate, if you try Python, you will find that you are substantially more productive because of dynamic typing. Python just works much harder to improve productivity of the programmer, as compared to C# which is focused to create effective code (making programmer to work harder to get it). In testing, it is of little difference if test ...


3

driver = webdriver.Firefox() driver.implicitly_wait(10) # seconds driver.get("http:// enter your URL.") myDynamicElement = driver.find_element_by_id("myDynamicElement") Try above code and see if it is working or not.


3

wait = WebDriverWait(driver, 10) element = wait.until(EC.element_to_be_clickable((By.ID,'someid'))) Try above code and see if it is working or not.


3

In selenium the wait command doesn't really wait sometimes. That is there is some problem with that command. You can try the time.sleep(); command of python. It is an equivalent of the Thread.sleep(); command of Java. It will pause the execution of code for defined time limit. So you can give sufficient time that will allow your page to load. Hope it ...


2

If you're trying to register 100 accounts, this is a simple addition to your code to do that. for i in range(100): email_address = "money" + str(i) + "@qa.test" firstName.send_keys("mike") lastName.send_keys("mano") emailField.send_keys(email_address) passwordField.send_keys("test12") submitButton.click()


2

data-href is an attribute of a HTML tag, try to use get_attribute method, something like: url = browser.find_element_by_xpath("//a").get_attribute("data-href") For more information see: http://selenium-python.readthedocs.org/en/latest/api.html#selenium.webdriver.remote.webelement.WebElement.get_attribute Or this for examples: ...


2

In my opinion it's better to develop with the tools and languages that you love. Here are good Selenium recipes, code examples & API references for Ruby: http://samples.leanpub.com/selenium_recipes-sample.pdf https://code.google.com/p/selenium/wiki/RubyBindings http://rubydoc.info/gems/selenium-webdriver/2.2.0/ (the right top corner)


2

At least on http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.html?r=2.8.5#getting-started is nicely detailled installation instructions.


1

Selenium is not able to interact directly with OS functionality. So unless there is some backend service that allows you to create the connection through the browser somehow you can't use Selenium for this. Options: Write custom code to do this outside of selenium and then put it in the middle of your test Utilize another testing tool at least for the ...


1

read up on Select object - http://selenium-python.readthedocs.org/en/latest/api.html?highlight=select#module-selenium.webdriver.support.select Use IDs or names, or even CSS before XPATH. Best practices, explained here


1

I was able to answer my own question, Please see script below: urlTextBox = "url" dropdownOption = "location" submitBtn = ".//*[@id='start_test-container']/p/input" homeBtn = ".//*[@id='nav']/li[1]/a" webTeamPage = "personalwebpage.com" select = driver.find_element_by_id(dropdownOption) #get the ...


1

Talking about UI testing you can try Sikuli - great tool which uses image recognition. Also it is a lib which can be installed with Sikuli: Tesseract which allows to grab/recognize text. It supports Python(Jython), Java, etc.


1

You might try WTFramework It seems like a decent starting place for python test infrastructure. I didn't end up using it because my tests ended up using more php and javascript. There are examples of using the page object design pattern.


1

I've been using the following as a constant: FF_PROFILE_PATH = os.path.join(os.environ['APPDATA'], 'Mozilla', 'Firefox', 'Profiles') I believe it's consistent across OSes per Mozilla support documentation. To locate the correct profile, you can iterate through the list created by os.listdir to find the profile, as such: ...


1

First of all: Welcome to SQA. Apart form the features of C# and Python, your team should also use C#. The web testing team can reuse scripts from the automation team. The teams can support and complement each other. They can talk about problems and challenges and find solutions together. That Python already have a xUnit framework in the standard library is ...


1

I eventually managed to find a fix for this! Here is the code that I added: cap = DesiredCapabilities.INTERNETEXPLORER cap['requireWindowFocus'] = True cap['enablePersistentHover'] = False I put this just before self.browser = webdriver.Ie() Although, this may not be a long term solution as it requires the IE window you are using to be your current ...


1

Do you have a single monitor? Is your actual mouse cursor hovering over the page while your automation is running? Sometimes your mouse will mess up the automation that is running. If you have a second monitor, or if you can move your mouse cursor outside of the bounds of the browser window, do you still have the problem? In javascript there isn't a ...


1

The problem seems to be that homebrew doesn't have an obvious way to install both 3.3 and 3.2 and a somewhat extended Googling did not yield an answer. — Try the following solution to install multiple Python 3.x versions with brew: Make sure you don't have any Python 3.x installed: brew uninstall python3 Then cd into your brew directory, this is ...


1

At this point of time it doesn't matter which language you'll start with, 'cause both are relatively easy to learn considering the number of educational resources available. The more important thing is the language your application under test is developed with. In case when the application under test written in Java and you do your automated testing ...


1

thank you all for your suggestions. Though it's still not perfect, I now have a better working environment. I combined Artem's suggestion of removing external dependencies with Pushpendra's tip to boost up implicit_wait and page_load_timeout further up. They are now at 12 and 30, but I intend to go even higher. I've also increased the sleep times, as ...


1

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.


1

Well it depends on what you set up, in my environment I had Python, Java, PiP and EasyInstall loaded then it was simply a matter of running: pip install robotframework But it's simple enough to find the instructions on the Robot Framework site and check out the link to the Installation Instructions. The Robot Framework site has links to examples as well, ...



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