string str = "&action";
char[] characters = str.ToCharArray();
IWebDriver driver = new ChromeDriver("C:/Users/kathiravan/Desktop/New Algo/");
driver.Navigate().GoToUrl("https://kite.zerodha.com/connect/login?v=3&api_key=sjc0vn34q8tu05czx7");
RequestToken = driver.Url.Split('=')[1].Split(characters)[0];
From the above URL I am navigating to another URL and split that URL, used to get two different types:
- https://zerodha.com/?status=success&request_token=IFmqdfS3QYw3SZqoeiuCPLCsT2BaWN2I&action=login from this url i want only value IFmqdfS3QYw3SZqoeiuCPLCsT2BaWN2I some times the same url
- https://zerodha.com/?status=success&request_token=IFmqdfS3QYw3SZqoeiuCPLCsT2BaWN2I the required value will be at the end IFmqdfS3QYw3SZqoeiuCPLCsT2BaWN2I
I want to get value after 'request_token=' and before '&action' sometime at the end how to achieve, I have tried all the possibilities but negative. Any one can help this issue?