Belajar Selenium Python-Java Eclipse di Ubuntu

Selenium itu bisa untuk AutoFill Form Web

Caranya:

1. Copy dan rename: selenium.sh

#!/bin/bash# Following the guide found at this page # http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html

echo "\r\nUpdating system ...\r\n" 
sudo apt-get update

# Create folder to place selenium in 
# echo "\r\nCreating folder to place selenium in ...\r\n" 
sudo mkdir ~/selenium cd ~/selenium

# Get Selenium and install headless Java runtime # 
echo "\r\nInstalling Selenium and headless Java runtime ...\r\n" 
sudo wget http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar 
sudo apt-get install openjdk-7-jre-headless -y 

# Install Firefox # 
echo "\r\nInstalling Firefox ...\r\n" sudo apt-get install firefox -y 

# Install headless GUI for firefox. 'Xvfb is a display server that performs graphical operations in memory' # 
echo "\r\nInstalling XVFB (headless GUI for Firefox) ...\r\n" 
sudo apt-get install xvfb -y 

# Finally, starting up Selenium server #
echo "\r\nStarting up Selenium server ...\r\n"DISPLAY=:1 xvfb-run java -jar ~/selenium/selenium-server-standalone-2.53.1.jar

source: https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c

2. di terminal ketikkan:

chmod +x selenium.sh

./selenium.sh

3. lihat prosessnya sampai keluar Selenium server running

4. untuk start stop server selenium

java -jar ~/selenium/selenium-server-standalone-3.0.1.jar
http://localhost:4444/selenium-server/driver?cmd=getLogMessages
http://localhost:4444/wd/hub/status
http://localhost:4444/selenium-server/driver?cmd=shutDownSeleniumServer

5. untuk testing di chrome, utk firefox belum tahu caranya

sudo apt-get install chromium-chromedriver

ketik di editor dan beri nama misal python_test.py

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome("/usr/lib/chromium-browser/chromedriver")

#driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()

silahkan tes di terminal

python python_test.py

6. Hasil pengujian:

selenium-server-standalone-2.53.1.jar SUPPORT => downgrade ke mozilla 45.0.2

link download mozilla deb: https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/

selenium-server-standalone-3.0.1.jar TIDAK SUPPORT MINT 17

 

source:

http://selenium-python.readthedocs.io
Configure Eclipse with Selenium WebDriver
Advertisements

MySQL said: Documentation #2002 – No such file or directory The server is not respon

Ketika membuka http://localhost/phymyadmin, tampil :

Error

MySQL said: Documentation
#2002 - No such file or directory
The server is not responding (or the local server's socket is not correctly configured).
Connection for controluser as defined in your configuration failed.

screenshotnya :

bbc5f715bc4f7ef4df78769b92b0eeb256f7536490

solusi saya:

sudo service mysql start

sudo service mysql stop

sudo /opt/lampp/lampp restart

sumber gambar dan prolog artikel:

http://forums.devshed.com/php-development-5/mysql-documentation-2002-file-directory-server-respon-959987.html

PHPMYADMIN not found mysql.sock

I had the same problem when i installed xampp on my system. The mysql server looks for /var/run/mysqld/mysqld.sock but the mysql.sock file was in xampp folder so i used

 find / -name '*.sock'

to find the mysql.sock file and then used

ln -s <the file location> /var/run/mysqld/mysqld.sock

to get a link for the *.sock file then tried mysql and it ran without error. Hope this could solve yours.

Remember to create the directory if it does not exists.

sumber: http://stackoverflow.com/a/19678127

*) Jika tetap tidak menemukan mysql.sock nya :

sudo apt-get install mysql-server  
(jika telah terinstall, maka install ulang)
sudo service mysql stop
sudo /opt/lampp/lampp start
(sampai status mysql running)

*) intinya jangan sampai ada dua mysql jalan berbarengan

sumber: http://stackoverflow.com/questions/11990708/error-cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysq

Export Import Connections FileZilla and SQLYog

Daripada ketik2 settingan koneksi ftp/database saat pindah2 komputer, ini cara praktisnya :

1. FileZilla (FTP Tool)

untuk export : buka menu file – export

untuk import : menu file – import

2. SQLYog Community Free (Database Tool)

Menu Tools Export / Import Connection Details: (tinggal pilih) Export/Import Connection Details

Enak khaann.. !!

filezilla-sqlyog

sumber gambar:

http://blog.hostmysite.com/installing-and-securing-filezilla-ftp-on-your-windows-vps/

http://wongnewbie.blogspot.com/2014/04/download-sqlyog-ultimate-1111-full.html

Start XAMPP Automatically in Ubuntu

XAMPP
Masak tiap kali membuka /localhost tidak bisa dikarenakan services XAMPP nya belum aktif

sudo  /opt/lampp/lampp start

Untuk otomatisasi silahkan ikuti langkah berikut:

sudo gedit /etc/init.d/lampp

Jika tidak ada gedit, silahkan pakai editor lainnya.
Lalu copykan script berikut dan save

#!/bin/bash
/opt/lampp/lampp start

Ketikkan di terminal:

sudo chmod +x /etc/init.d/lampp
sudo update-rc.d lampp defaults

Selesai !!

Silahkan restart sistem dan ketikkan di browsermu /localhost
Gimana uda bisa langsung diakses kan /localhost nya ?

Sumber:

http://computernetworkingnotes.com/ubuntu-12-04-tips-and-tricks/how-to-start-xampp-automatically-in-ubuntu.html

Install SVN atau GIT editor di Linux Mint 17 dengan RabbitVCS


    $ sudo add-apt-repository ppa:rabbitvcs/ppa
    $ sudo apt-get update
    $ sudo apt-get install rabbitvcs-nautilus3
    # Optional
    $ sudo apt-get install rabbitvcs-gedit
    $ sudo apt-get install rabbitvcs-cli


$ sudo ln -s /usr/lib/i386-linux-gnu/libpython2.7.so.1.0 /usr/lib/libpython2.7.so.1.0
$ sudo ln -s /usr/lib/i386-linux-gnu/libpython2.7.so.1.0 /usr/lib/i386-linux-gnu/libpython2.7.so
mengubah akses dari root ke folder lokal
$ chown -R $USER:$USER ~/.config/rabbitvcs    (tinggal copas saja)

sumber:
http://askubuntu.com/a/464535
http://aruizca.com/how-to-integrate-rabbitvcs-with-nautilus-file-manager-in-ubuntu-14-04-trusty-tahr/