Tag: code sample

May 21

Selenium – Screenshotting the ENTIRE page

Selenium already has a screenshot function but there’s a problem with it. it takes a screenshot of what you see in the window. when i did some Selenium Test Scripts a couple years back for Rivers i wanted to build them so that if an error appeared, unless the tests were dependent on one test …

Continue reading

May 12

Selenium – Select drop down option by Frontend Text

one of the annoying things i found in Selenium is that when working with a drop down you needed to know the value of the open you wanted to select which oftern is different from the value the user will see. if you was testing and you wanted to make sure that a front end …

Continue reading

Feb 07

Padding string without loops

So if we wanted to pad a string in PHP with a prefix or suffix generally we would need to do this now obviously if we were adding a suffix we’d skip $added and just append the original string (if we didn’t want to keep it). however for shits and giggles say we didn’t want …

Continue reading

Jan 02

How to store a var_dump

one thing i really like about PHP is var_dump, a nice little function that outputs what an object is regardless of type, including classes which shows what data is private and protected. when i need to debug a language one of the first things i look for is a equivalent. but sometimes the var_dump either …

Continue reading