How to add class in <a> tag using Textile Markup language - textile

I am using Textile Markup language. I am stucked at one thing:-
"Do (D above middle C)":https://s3.amazonaws.com/tuneables/Guided+Activities+Sounds/Do+bell.mp3
above code shows HTML Do
in this tag how can I add a class named "fancybox" so it will show '<a>' tag with this class.
Please Help.!!

"(class-name)Do (D above middle C)":https://s3.amazonaws.com/tuneables/Guided+Activities+Sounds/Do+bell.mp3

Related

How do I add HTML tags and links in QnA-maker?

I have tried the suggestions provided for other similar questions but they didn't work.
here 2 example:
1) Link: name of your link is changed by QnAMaker during the save and train step in name of your link](https://url.com)) and it is diplayed in the test feature
name of your link](https://url.com))
2) <b> bold text </b> is not changed in bold and the same thing happens with the escaped html
Did you consider markdown? You examples are supported.
Cheatsheet to help you on you way.

Need to get the ID value of sub-element in protractor

I am trying to automate test case using Protractor and Jasmine. The problem is I have an "article" web element tag that gets created at runtime and this web-element has a as sub element. This div element has a "id" tag associated with it. The structure of the code is below.
<article class="a b c d" data-ng-repeat="xyz repeat">
<div id="THIS IS WHAT I WANT" class="class name">
</article>
Now I am able to get get hold of the article web-element. but I am not able to get the ID attribute in the div. The ID values is generated dynamically. Kindly suggest how I can get the ID value.
Thank you
You can use a CSS Selector like this:
article > div
This will get you a div inside of an article. Now you can use this to play around and specify the selector further with classes or other stuff.
If you managed to get the div element you can then pull out the idea using (not sure if the syntax is correct but you should get the idea):
element.getAttribute('id')
1) element(by.xpath(//div[#class='class name'])).getAttribute('id')
2) element(by.xpath(//article [#class='abcd']//div[#id='THIS IS WHAT I WANT'])).getAttribute('id')
You can use chains like this:
element(by.classname('')).element(by.className('classname'));
or
element(by.css('css of parent')).element(by.css('child css'));
or you can use element(by.repeater('repeat in reapeats')).element(by.css(''));

How to verify text across HTML elements in Selenium

Given the following code, how would I verify the text within using Selenium?
<div class='my-text-block>
<p>My first paragraph of text</p>
<p>My second paragraph of text</p>
</div>
I am wanting to, in one verifyText statement to capture all the text:
My first paragraph of text
My second paragraph of text
Is it possible?
Since you've tagged this with selenium-webdriver, I'm assuming you want a code example but because you've not stated what language you're using, I'll give you a python example. It should be easy to translate that to a different language if needed.
ok(driver.find_element("class", "my-text-block").text == "What I expect it to be")
The text attribute on a WebElement object simply contains all visible text within that element and all children elements.
And some lovely docs, of course.

How to check if a text is in web page in Robot Framework and Selenium

I'm currently creating an automation test for a website and I want to check if a text(s) is in the page. I could use the keyword 'Page should contain' to check; however, I want it to be a little more specific on having it check specifically where the text exist in the page. Is there a way I can have it check if a specific div contains the text?
You can easily do this with a built-in Selenium2Library tags.
For a partial match use this:
Element Should Contain locator expected_text
For an exact match use this:
Element Text Should Be locator expected_text
If your HTML code is something like:
Your div tag and need to find FindMe
<div class="gwt-Label">This FindMe DIV</div>
Then you can find "FindMe" text like:
//div[#class='gwt-Label'][contains(string(),'FindMe')]

How to display data in a textarea using struts application

How do you display data in a 'textarea' using struts application,
This is my code:
<html:textarea property="comments" </html:textarea>
<bean:write name="FormBean" property="comments"/>
where FormBean is my beanclass and comment is a property in beanclass.
But I cannot get it too work.
Thanks in advance for your help.
If you use Struts action forms and you have the html:textarea tag inside your html:form tag (this tag is only valid when nested inside a form tag body) then the following code is all you need:
<html:textarea property="comments" />
Don't know what you are trying to do with bean:write but if you want to display that inside your html:textarea I'm not sure you can. The property attribute is mandatory for the html:textarea tag and will use that as the content.