How to view documents using Visual Studio

View documents in Visual Studio with an amazing tool

Xpath Axes

A very useful trick for automation

Review: Spire.DataExport for .NET

A great tool for exporting data in .NET

How to install Arch Linux, step by step, for VMware Workstation (Part I)

First part of a installation tutorial for this beloved OS

How to setup a local repository in Ubuntu

The steps to have a local repo in Ubuntu

Thursday, September 8, 2016

Wikileaks, Snowden, Russia and Trump: Who are them and what they want


Organizations like Wikileaks and people like Julian Assange or Edward Snowden often have an image of courage and integrity. This image puts them in a position of influence in the world, and of course, the US elections.

You may have noticed that Wikileaks is very anti-Clinton. They do not endorse Trump in any way, but they are constantly monitoring the Democratic Party and any fact or rumor they can find about Clinton. And why is this? Simple: They are anti system, and Clinton represents this system better than anyone, for better or worse. But is being anti system a good thing per se? Obviously no.

For example, let's take the case of Julian Assange, the interesting founder of Wikileaks. There are some points about him that I don't like at all:

Assange friends


Putin: It does not matter in which side you are on: Putin is a corrupt semi-dictator. I've know Russian personally, and they tell me about an authoritarian and corrupt government. My own country does deals with Russia, and believe me, they ARE corrupt.

Ecuador, Bolivia and the other "21st century socialists": These countries are struggling with economic, political and social problems generated by the populist governments. As Russia, authorities in these countries constantly look for partners in a world that's leaving them behind, and they find friend in any kind of outcasts, no matter if they are good or bad.

Assange and Snowden do not criticize Russia


An important information source such as Wikileaks should at least have some equilibrium when investigating different countries. My country had a lot of problems because of the US, but Russia is by no means better, and I know it because my country has close relations with Russia and there are always problems with bribes and stuff.

Trump


In the logic of "our enemy's enemy is our friend", Assange and Snowden have been clearly trying to undermine Clinton's reliability. And this is like a general attack on the establishment. But what about Russia? Here are some words about Russia by Assange himself:

“Every man and his dog is criticizing Russia,” he said. “It’s a bit boring, isn’t it?”

Well, it might be boring but it is definitely important, Julian. And why is this? Just because Russia is against the "American Empire". In my country is the same, people tend to blame "the Empire" for everything. If my girlfriend cheats on me it's because the American Empire convinced her to. The same with Trump. I guess some people do not care if they are indirectly supporting a monster, as long as he is against his current enemies. It's very shortsighted, and dangerous in the sense that, at the end of the day, these "rebellious" people and organizations follow their own agenda as well.

Tuesday, September 6, 2016

Tip: How to match node with no text using XPATH


When automating, there are times when you have to verify that a value was not populated. For example, if you are trying to verify a table, there will be times when a certain cell does not have a value. Sometimes, when an element is null or non existing in a table, developers turn it into a node with no text in HTML. For example, the table at http://www.w3schools.com/cssref/pr_tab_empty-cells.asp:

Node with no text

Let's check the steps to verify this. What you will need (these are not mandatory, but it's what I used to write this article):
Steps:

1. Right click the empty cell > click 'Inspect Element With Firebug'. With this, we'll get the information to construct the xpath:
Empty cell HTML
2. We will select the table initially, and from there we will "navigate" to the empty element.
HTML tree
3. Click the FirePath tab and enter this xpath: //table[@class = 'w3-table-all notranslate']/tbody/tr/td
All td nodes matched
As you can see, all td nodes are matched by this.

4. Add [not(normalize-space())]. The final xpath should be: //table[@class = 'w3-table-all notranslate']/tbody/tr/td[not(normalize-space())]. Now press enter and the empty cell will be selected.

I hope this is useful for your automation efforts!