Exemple #1
0
        public string getURL_TTSCool(string _urlvoicecu, string text)
        {
            string ex = _urlvoicecu;
            try
            {

                txt_ttscool.Clear();
                txt_ttscool.SendKeys(text);
                btnSayIt.Click();
                Thread.Sleep(3000);
                int kiemtra = 0;
                switch (kiemtra)
                {
                    case 0:             // label case 1
                        System.Threading.Thread.Sleep(3000);
                        goto case 1;
                        break;
                    case 1:
                        try
                        {
                            ex = SeleniumGetMeThor.GetTextLink(link_ttscool);
                            Thread.Sleep(4000);
                            if (ex != _urlvoicecu)
                            {
                                return ex;
                            }
                            else
                            {
                                goto case 0;
                            }
                        }
                        catch { goto case 0; }
                        break;

                }

                return ex;
            }
            catch
            {

            }
            return ex;
        }
Exemple #2
0
        public string getURLMp3_V2(string _urlvoicecu, string text)
        {
            string ex = _urlvoicecu;
            try
            {               

                m_text2.Clear();
                m_text2.SendKeys(text);
                btnlisten.Click();
                Thread.Sleep(2000);
                int kiemtra = 0;
                switch (kiemtra)
                {
                    case 0:             // label case 1
                        System.Threading.Thread.Sleep(2000);
                        goto case 1;
                        break;
                    case 1:
                        try
                        {
                            ex = SeleniumGetMeThor.GetTextLink(link2);
                            if (ex != _urlvoicecu)
                            {
                                return ex;
                            }
                            else
                            {
                                goto case 0;
                            }
                        }
                        catch { goto case 0; }
                        break;

                }

                return ex;
            }
            catch
            {
                    
            }
           return ex;
        }