So I have the scenario where I want to demonstrate to the business how Cucumber can be of benefit. It's easy to setup a demo and run but, without the proper visuals, the business won't really see the benefit... question is: is it possible to add a CSS class whilst the feature is being executed?
Something like this:
anchor = page.find_link(link);
anchor[:style].value = 'outline:yellow solid thick';
sleep 1;
click_link(link);
What I'm not sure is the second line. How can I achieve an outline style
on an element that is about to be clicked?
I couldn't find anything similar on the actual Cucumber spec. Any help would be appreciated.
Ok I found a solution: execute a script to modify the CSS.
page.execute_script("$('selector').css('property','value')");
Works quite well :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With