Given I login as "student" And I go to "/calendar/index" When I mouseover "#credits_count" Then I should see "Remaining rescheduling credits = 3" And I should see "47" in the "#credits_count" element
Month: August 2013
Sahi with chromium support
Chrome wasn’t showing up on Sahi as a browser option on Ubuntu 12.04 LTS.
To make this work open up Sahi, choose “Configure”, and edit the chrome <path> to:
... <path>/usr/bin/chromium-browser</path> ...
Simulate a click on fullcalendar event
For my current project I am using the excellent jQuery calendar plugin fullcalendar by Adam Shaw.
Whilst creating a functional test with phpunit and Selenium, I found that triggering a click on the calendar event was not reaching the procedure I defined for eventClick in fullcalendar. In fact, in order to get the click event to trigger, a mouseover event needs to be triggered on the same element. The correct way is:
$this->waitForElementPresent("css=span.fc-event-time"); $this->mouseOver("css=span.fc-event-time"); $this->click("css=span.fc-event-time");
1. Wait for the element to be present (important if using ajax events fetch).
2. Simulate mouseover.
3. Simulate click.
The “css=span.fc-event-time” locator will always point to the first event in the calendar, that’s ok for this example but if you need more specificity then I believe xpath is better.
Also, the above example also holds true for a js script. You always need to trigger a mouseover before a click!
mysqld dead but subsys locked
Had a problem in my VPS of the mysqld service spontaneously dying.
When I used the command:
sudo service mysqld status
I got a message saying, “mysqld dead but subsys locked”. I didn’t realise this machine didn’t have a swapfile, so in order to fix the problem I ran the following commands:
dd if=/dev/zero of=/swapfile bs=1M count=1024 mkswap /swapfile swapon /swapfile Open /etc/fstab and add this line /swapfile swap swap defaults 0 0