Tagged: testing

0

How to test a private method in rspec

Since you cannot access a private method directly, in order to test a private method, you can make use of the ‘send’ method that is available on all objects. @obj = MyClass.new result =...

0

Selenium and xpath – locate an element using class attribute

Issue : Locate the following element using its Class. <div class=”globalContainer”> <div> … </div> </div> Resolution : You can write the following query in the browser console. $x(//div[@class=”globalContainer”]) Further Reading xPath locator Practical Examples

0

Selenium and xpath – locate an element using id attribute

Issue : Locate the following element using its ID. <div id=”globalContainer”> <div> … </div> </div> Resolution : You can write the following query in the browser console. $x(//div[@id=”globalContainer”]) Further Reading xPath locator Practical Examples