Chrome driver issue

49 views
Skip to first unread message

Priyanka Saroch

unread,
Aug 16, 2016, 2:08:23 AM8/16/16
to Selenium Users
hello All,

I am using chrome driver from Coded UI automation and am facing some issues.i have attached the error that i am getting while executing the script.
Please have a look an suggest me any needful that can help me to resolve the issues .


 
Snap001.png

Ramesh Sankar

unread,
Aug 16, 2016, 2:47:13 AM8/16/16
to seleniu...@googlegroups.com
Can you attach the  code......

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/c63e753e-1de4-48b2-a283-5e7cd4c82a25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Priyanka Saroch

unread,
Aug 16, 2016, 5:17:45 AM8/16/16
to Selenium Users

i cant attach the entire code dear.


On Tuesday, August 16, 2016 at 12:17:13 PM UTC+5:30, Ramesh Sankar wrote:
Can you attach the  code......
On Tue, Aug 16, 2016 at 11:38 AM, Priyanka Saroch <priyank...@ignatiuz.com> wrote:
hello All,

I am using chrome driver from Coded UI automation and am facing some issues.i have attached the error that i am getting while executing the script.
Please have a look an suggest me any needful that can help me to resolve the issues .


 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

Priyanka Saroch

unread,
Aug 16, 2016, 6:21:57 AM8/16/16
to Selenium Users
This is the method where the code is getting stopped now,
 but earlier it was working fine with the same below code but from 2-3 day it has stopped.

have also highlighted the code line where i am getting the error.


public static void AssertMessage(string ExpectedValue, string Classinfo)
        {
            try
            {
                Playback.PlaybackSettings.AlwaysSearchControls = true;
                BrowserWindow br = new BrowserWindow();
                if (BrowserWindow.CurrentBrowser.ToLower().Trim() == "ie")
                {
                    br.SearchProperties[UITestControl.PropertyNames.ClassName] = "IEFrame";
                }
                else
                {
                    br.SearchProperties[UITestControl.PropertyNames.Name] = WinTitle;
                }
                HtmlSpan control = new HtmlSpan(br);
                control.SearchProperties.Add(HtmlSpan.PropertyNames.ClassName, "HtmlPane");
                control.SearchProperties.Add(HtmlSpan.PropertyNames.Class, Classinfo);
                UITestControlCollection utcc = control.FindMatchingControls();    -> Here on this line i am getting this error  
                string _content = "";
                Boolean flag = false;
                foreach (UITestControl utc in utcc)
                {
                    _content = utc.GetProperty(HtmlSpan.PropertyNames.InnerText).ToString();
                    if (_content.Trim().ToLower().Replace("\r\n", "") == ExpectedValue.Trim().ToLower().Replace("\r\n", ""))
                    {
                        flag = true;
                        utc.DrawHighlight();
                        System.Console.WriteLine("Expected message is \"" + ExpectedValue + "\" Actual Found \"" +  _content  + "\" ");
                       
                        break;
                    }
                }
                if (!flag)
                {
                    string error = "Expected message is \"" + ExpectedValue + " not found. \" Actual Found \"" + _content + "\" ";
                    WriteLogs("Failed", error);
                    CreateDefect(error);
                    Assert.Fail(error);
                }
                try
                {
                    Playback.Wait(5000);
                    WinTitle = br.Title.Replace(" - Google Chrome", "").Replace(" - Internet Explorer", "").Replace(" - Mozilla Firefox", "");
                }
                catch
                { }
            }
            catch (PlaybackFailureException e)
            {
                Assert.Fail(e.Message);
                WriteLogs("Failed", e.BasicMessage);
            }

        }

And the code execution stops here itself.
Auto Generated Inline Image 1
Reply all
Reply to author
Forward
0 new messages