Hot answers tagged

4

The installation instructions referenced by @dimitry-cheremushkin have been changed and recommend using pyenv instead. Tox and Pyenv can be used together like this: First we ensure we have pyenv installed: $ brew update $ brew install pyenv Then we install all the needed python versions with pyenv. This might take time. See python.org/downloads for ...


3

The most prominent load testing tools as for now are: Apache JMeter Gatling Grinder Tsung I would recommend checking out Open Source Load Testing Tools: Which One Should You Use? article which provides enough information to decide which one suits your needs in the best way. Personal recommendation: if your project is based on Jasper Reports it means ...


3

Oh Boy! you might start another one of the Java vs Python vs Other language war. These are kind of question which are always answered with preference for a specific language in mind. For me- I would prefer Python over Java, because of one reason : Its simplicity. Our test team comprises of people who have little programming experience. However, most of ...


2

You can put ChromeDriver wherever you like if you specify the path: chromedriver_path = "<path_to_chromedriver>" driver = webdriver.Chrome(executable_path=chromedriver_path) It's really up to you if you want in usr/local/bin or elsewhere.


2

If you are testing for a specific image at a specific resolution then you could either compare the image with the reference image or quicker calculate the MD5 of the image and compare it with the expected. Be sure and wait for the page to be loaded, including images, before validation.


2

Is there any specific reason to pick Java over Python? Not really. It depends on which language you feel more comfortable with. However, most of our developers (apart from the iOS devs, obviously) are intimately familiar with Python and are using it in our production environment. So go with Python. Then Devs can also contribute to e2e Test ...


2

Don't, really don't go this way even if it seems tempting. UI automation seems like a low hanging fruit- for example with AutoIt you can automate things really quickly and have a proof of concept running in no time. But the minute you'll hit something new, an environment change, OS popups, hardware change or heaven forbids an optional action you will see ...


2

If you client is developed in Java/Swing, you may want to try https://marathontesting.com/downloads/ . Is uses Python as a programming language.


2

The selectors seem ok. There may be something wrong in your setup. Please show how driver is being defined and how you are pointing at the page in question. For example please show lines similar to: driver = webdriver.Firefox() driver.get("http://www.yoursite.org") Are you getting NoSuchElementException ? What if you try driver.find_element(By.XPATH, '...


2

I believe Robot Framework Page Object Library is the closest one to the description. There is no activity on the said repo now, but that's not because of the usual reasons, the original owners are looking for someone to adopt it. It works pretty well as it is. The main reason why I like it more than a vanilla Python implementation is that it extends the ...


1

The silence is deafening :-) I have no personal experience with NightWatch, but I do have experience with the quirky nature of JavaScript, and because of that experience prefer Python, especially for big projects. Why you never ever reprogram working code from scratch - with history of failures cause by reprogramming from scratch. So if your company is ...


1

pywinauto might be useful for native C++ based desktop app automation. It uses mostly the same technolgies as AutoIt, but scripts are much more readable and maintainable because it's Python. SWAPY is an object inspector for pywinauto written in Python as well. It has some half-manual code generation functionality if you're new to GUI automation. There is ...


1

As @FDM mentioned the $x("//*[@id='email']") will find 2 matching elements. So you need to build a locator that is more unique/precise. If you search it in Firebug or any other console you'll notice that it yields two matching nodes. I'm not sure in Python how it should be, but I tried this in Java using the following CSS selector and it worked. driver....


1

try...except block will allow you to bypass the timeout. But if you need that you are doing it wrong. Check presence of element before you wait of it's visibility.


1

So after some deliberations and code changes (not much), I was able to port the HTMLRunnner code to Python 3.0+ compatible mode. I ran a simple test suite using the HTMLRunner and I can see an HTML report created out of it. It's not as fancy as Allure but it does the job. Another option suggested by @Amazpyel is Nose, although I haven't tried it out yet. ...


1

@Brenden In my experience, it is better to keep the validations as close to the end user or top of the stack as possible and have the underlying workers be as generic as possible. In your case, you should probably even consider moving the validation from classB to classA so that your classB is free of the constraint and becomes a bit more generic to be ...


1

I am currently working on an angular app with python/selenium e2e tests. The main difference is that protractor offers not just selection logic (model, binding, etc.) but also implicitly waits for angular page load, url changes, model updates. To make up for these missing pieces. We had to have a fair amount of explicit waits. I have not used it personally,...


1

Ok, this is very old, but the answers in here are focusing only in language independently that he said he wanted to use appium. If your devs had a clear preference, then go with that, if not, then I would say go with java, because the java-client its kept more updated and the community using java is way bigger. python client: https://github.com/appium/...


1

I will go for Python because of it's simplicity. Python code looks readable and can be easily understood and even others who have very limited programming skills can also join in later phase of automation to accomplish voluminous scripting/data addition work if you have put a nice data driven framework.


1

If I understand correctly, you're working with an n-tier system that communicates via something resembling an API. Given this assumption, I'd build a framework that allows the creation, transmission, receiving and parsing of messages to and from the application. At this point your actual test data can be in any format, and don't need to be coupled to your ...


1

The way I corrected this was to manually copy the ddt files from /usr/local/lib/python2.7/dist-packages to /usr/local/lib/python3.4/dist-packages Copied the following two files : ddt.py ddt.pyc and the directory ddt-1.0.0.dist-info If any body could come up with a better solution, then please add your answer. It would be more than welcome :)


1

For automatically testing an API in a CI/CD scenario, try Runscope. It integrates with several build/deploy tools, including Jenkins (see Jenkins integration instructions here). In fact, I just put out a Jenkins plugin for Runscope that makes it super simple -- API tests are just build steps. You'll find GitHub link to plugin on second link above. You can ...


1

Splinter does not support find_by_class_name. Splinter has support for find_by_option_by_text and find_option_by_value but it does not look like you have the option tag in the html. Try using find_by_css instead for the list elements. This code snippet assumes your list items are visible: browser.find_by_css('.option1') If they are invisible, you will ...


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.


1

The problem is that you don't switch to opened window, and webdriver searches for elements in the old page instead of the newly opened one. Solution: String winHandleBefore = driver.getWindowHandle(); for(String winHandle : driver.getWindowHandles()){ driver.switchTo().window(winHandle); } This java method's part switches to ...


1

Try out Galen; it's designed for testing responsive web design across different platforms and different sized viewports, so its all about how web elements are laid out on screen: Layout testing seemed always a complex task. Galen Framework offers a simple solution: test location of objects relatively to each other on page. Using a special syntax and ...


1

I had used browsermob-proxy and its Python client successfully in one of my project by using rewrite url to load mocking content. browsermob-proxy is a proxy server for the browser to connect with during testing. Assume you are hosting a webserver with mock content on localhost:8899, below example will load the mock content whenever the browser try to load ...


1

I've figured out how to deal with this issue. I used the Visual Event tool to determine that edits to data in the text box triggered the JQuery change event. Next, I learned a bit of JQuery so that I could use it to set the field value and fire the change event. Finally, I replaced my original code with the snippet below. driver.execute_script("$('....


1

It rather sounds like your first port of call should be talking to your development team to find out exactly what processes are affecting the text entry. There's definitely something moer than you know if those steps aren't providing results.


1

Does your element put inside in iFrame? If it's in iFrame, you should switch driver to that. OR Could you try with element = driver.findElement(By.cssSelector("div.clearfix.stk_btm_toptabs.text-center>a.stk_btm_chpFlight.active"));



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