Skip to content

Instantly share code, notes, and snippets.

@romainpiel
romainpiel / MyTest.java
Last active August 13, 2019 08:31
Source for https://medium.com/p/3f6f4179652e - "RecyclerView and espresso, a complicated story"
RecyclerViewInteraction.<Item>onRecyclerView(withId(R.id.recyclerview))
.withItems(items)
.check(new ItemViewAssertion<Item>() {
@Override
public void check(Item item, View view, NoMatchingViewException e) {
matches(hasDescendant(withText(item.getDisplayName())))
.check(view, e);
}
});
@mariomartinezsz
mariomartinezsz / buscapdf.py
Created January 5, 2013 20:20
Find links to pdf files in HTML with BeautifulSoup (Just one level)
import urllib2
from bs4 import BeautifulSoup
my_url = 'http://slav0nic.org.ua/static/books/python/'
html=urllib2.urlopen(my_url).read()
sopa = BeautifulSoup(html)
current_link = ''
for link in sopa.find_all('a'):
current_link = link.get('href')
if current_link.endswith('pdf'):
print('Tengo un pdf: ' + current_link)