How to create link in SharePoint custom text field? - sharepoint-2010

I have created custom text field MyItemURL, I am trying to achieve thru coding if user click on Click Me the link should open, but in my coding entire url is appearing under MyItemURL. Just wanted to display Click Me link, how can i do this?
Here is my code:
string completeURL="MyItemComplete URL generated here";
listitem["MyItemURL"]=" Click Me ";
listitem.update();

In listitem["MyItemURL"]=" Click Me you are assigning the value of a text field, not an HTML fragment. If you want a URL field, then use SPFieldUrl and not SPFieldText.

Related

Selenium: How to get text without clicking on tab?

I'm trying to find text that is located on a specific tab. For some reason the text is available in the html but when I use the command driver.find_element_by_id('hand-graph-title-overview').text without clicking on the 'Overview' tab it returns a empty string. However, when I do click on the 'Overview' tab it will return 'Unpaired OOP' successfully. Does anyone know how to get the text without clicking on the tab?
Images of what I'm trying to scrape.
https://i.stack.imgur.com/9nSc0.png
https://i.stack.imgur.com/MyvDA.png
Maybe try and get the 'value' attribute of the element.
driver.find_element_by_id('hand-graph-title-overview').get_attribute('value')
The answer is no. You can't access the element from the other tab without focusing on it. Retrieval of text is totally based on the presence of the element on the current page. When you click on tab then automatically it gets loaded in the dom and then only you can access the element.

How to handle dynamic text with no div tags and no info where they are coming from in Selenium?

I have registration form for which I am trying to create a script.If we don't enter any value in any of the fields and click submit, it is showing a dynamic error message that "Please fill out this field!"
There is no div tag for this text. Moreover, if we click anywhere on the screen, it is disappearing. Can anyone tell, how to read this text?
Thank you.
When the field is marked as required, the Browser shows the message when the form is submitted. There is no way available for you to access it.
You can handle it within your test code by checking that all required fields are entered before submit is called.

How to label return key in custom keyboard based on text input type

I am creating a custom keyboard. I have a button for Return/Go/etc. If the user is entering a URL, my button text should be "Go". If she is writing in note, it should be "Return".
How can my keyboard extension figure out what label to put on the button?
Your text document proxy conforms to UITextInputTraits, so you want to use self.textDocumentProxy.returnKeyType or .keyboardType.

Button Click in webpage via HTMLagilitypack

I am trying to fillout particular form over webpage using HTMLagility pack, but I am stuck as How to click the button on form via HTMLAgility. I have seen other option like HTMLElement, but I am not much into it.
below is link where one can have look
http://www.moneycontrol.com/india/fnoquote/acc/ACC
in this page, I am able to select "STOCK" dropdown menu and Expiry dropdown by setting attributes. But I need to click the "SEARCH FUTURES" button.
Any help of kind will be absolutely thankful.
All code should be explan in vb.net requested
You can't use the Html Agility Pack to click to click a button, nor do you want to. The easiest way to achieve what you are tying to do is install a tool that will view HTTP post parameters. I use fiddler, and you can download it here: http://www.telerik.com/download/fiddler. When you click the "Search Futures" button, here is the POST data that is sent:
instrument_type=FUTSTK&post_flag=true&see_all=&sc_id=MPS&short_name=Adani+Ports&user_sel_price=&stock_code=MPS&sel_exp_date=2014-02-26
If you look closery you can see "Adani Ports" and "2014-02-26". Those are the values from the the Stock and Expiry Date drop downs. Modify those two values to whatever you want, then send an HTTP POST from your app containing that post data.

PassBook + ios 6

In Pass.Json file, how to write a code for adding button and how to add hyperlink text, which dynamically update the link, after user click the hyperlink text?
Please let me know if someone come across with same requirement.
You cannot add a button or hyperlink to a pass.
There is a fairly clumsy workaround to update a pass based off a user action that takes advantage of the fact the URLs, phone numbers, dates and addresses that appear on the back of the pass are automatically made clickable.
So while you cannot add a button or hyperlink text per-se, you could add a link to a script that when clicked on, triggers a push update that updates the pass with your new content. This pass contains a good example, and the source code is available here.