Switch tabs using Selenium WebDriver with Java

psdbComponent.clickDocumentLink(); ArrayList<String> tabs2 = new ArrayList<String> (driver.getWindowHandles()); driver.switchTo().window(tabs2.get(1)); driver.close(); driver.switchTo().window(tabs2.get(0)); This code perfectly worked for me. Try it out. You always need to switch your driver to new tab, before you want to do something on new tab.

What is Grunt for?

Grunt is basically a build / task manager written on top of NodeJS. I would call it the NodeJS stack equivalent of ANT for Java. Here are some common scenarios you would want to use grunt under: You have a project with javascript files requiring minification, and generally generating a front end build seperately (in … Read more

How to automate development environment setup? [closed]

There are several options, and sometimes a combination of these is useful: automated installation disk imaging virtualization source code control Details on the various options: Automated Installation Tools for automating installation and configuration of a workstation’s various services, tools and config files: Puppet has a learning curve but is powerful. You define classes of machines … Read more

Automatically create an admin user when running Django’s ./manage.py syncdb

I know the question has been answered already but … A Much simpler approach is to dump the auth module data into a json file once the superuser has been created: ./manage.py dumpdata –indent=2 auth > initial_data.json You can also dump the sessions data: ./manage.py dumpdata –indent=2 sessions You can then append the session info … Read more

automatically execute an Excel macro on a cell change

Your code looks pretty good. Be careful, however, for your call to Range(“H5”) is a shortcut command to Application.Range(“H5”), which is equivalent to Application.ActiveSheet.Range(“H5”). This could be fine, if the only changes are user-changes — which is the most typical — but it is possible for the worksheet’s cell values to change when it is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)