Click here to Skip to main content
15,911,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using Selenium 2 with HTMLUnit Driver through C#. I want to store some text from the webpage to a variable. How would I go about doing this?

Any help is greatly appreciated.
Posted
Updated 1-Jun-11 23:50pm
v2

1 solution

Use a session variable:

C#
Session["MyVariable"] = value;
 
Share this answer
 
Comments
Harish Kumar Bansal 2-Jun-11 6:53am    
i am able to get text by Selenium 1 as like:---

string var;

var = Selenium.GetText("........Xpath/ID/name etc...........")

but i want to use Selenium 2 and HTMLUnit driver. so how can i get text?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900