This is a migrated thread and some comments may be shown as answers.

Edge browser can't a get computed style of an element if one contains a dash '-'

6 Answers 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ivan
Top achievements
Rank 1
Ivan asked on 28 May 2019, 04:02 AM

Hello, there is a problem.
Code:
HtmlSpan span = row.Cells[5].Find.ByTagIndex<HtmlSpan>("span", 0);
if (span != null)
{
    try
    {
        Utility.LogMessageToFile("color = " + span.GetComputedStyle("color").Value);
        Utility.LogMessageToFile("cursor = " + span.GetComputedStyle("cursor").Value);
        Utility.LogMessageToFile("font-size = " + span.GetComputedStyle("font-size").Value);
        Utility.LogMessageToFile("text-align = " + span.GetComputedStyle("text-align").Value);
        Utility.LogMessageToFile("background-color = " + span.GetComputedStyle("background-color").Value);
    }
    catch (ExecuteCommandException ex)
    {
        Utility.LogMessageToFile(ex.Message);
    }
}

the row variable is KendoGridDataItem

And the result below:
28-MAY-2019, 10:30:29.245: color = rgb(255, 255, 255)
28-MAY-2019, 10:30:29.266: cursor = default
28-MAY-2019, 10:30:29.286: ExecuteCommand failed!
BrowserCommand (Type:'Information',Info:'ComputedStyle',Action:'NotSet',Target:'ElementId (tagName: 'span',occurrenceIndex: '12')',Data:'font-size',ClientId:'05eb9dc2-082a-46e6-abdc-18f196ca3092',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')
InnerException: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ArtOfTest.WebAii.Messaging.Process.WebDriverCommandProcessor.GetComputedStyle(BrowserCommand command)
   at ArtOfTest.WebAii.Messaging.Process.WebDriverCommandProcessor.ProcessInformationCommands(BrowserCommand request)
   at ArtOfTest.WebAii.Messaging.Process.WebDriverCommandProcessor.ProcessCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Messaging.Process.BrowserWebDriverRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
   
As you see styles without '-' is got successfully but with it "The given key was not present in the dictionary."
I tried all styles are contained in the code.
IE, Chrome, Firefox get this successfully.

6 Answers, 1 is accepted

Sort by
0
Ivan
Top achievements
Rank 1
answered on 28 May 2019, 04:12 AM

Forgot to write versions

Test Studio 2019.1.212.0

Windows 10, version: 1809, OS build: 17763.529

Microsoft Edge 44.17763.1.0

Microsoft EdgeHTML 18.17763

WebDriver 10.0.17763.1

0
Plamen Mitrev
Telerik team
answered on 28 May 2019, 07:34 AM
Hello Ivan,

Thank you for sharing details about your environment and code.

I believe that LogMessageToFile() is a custom method and I am not sure what kind of logic is behind it. It is not part of Telerik Testing Framework and I am not able to reproduce the misbehavior. I want to help you and to do that I will need your help. Please share additional details on the topics below.
  • A sample test against a public application that reproduces the misbehavior. This will allow me to run the test on my end and investigate it further. 
  • I will have to reference the custom assembly in the test project. Please attach the .dll that contains the Utility class and LogMessageToFile() method.

I am looking forward to hearing from you.

Regards,
Plamen Mitrev
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Ivan
Top achievements
Rank 1
answered on 28 May 2019, 08:44 AM

Hello Plamen Mitrev,

I attached a test project.
Just run a test list.
My results in the archive.
I hope it will help.

0
Plamen Mitrev
Telerik team
answered on 28 May 2019, 10:28 AM
Hello Ivan,

Thank you for the test project that reproduces the misbehavior against a public page.

I have analyzed the test execution and I created a public bug report item on your behalf. We will investigate the issue further on our side and plan to fix it in our future releases. Please understand that at this point I am not able to promise you when the bug will be fixed.

Thank you for your feedback.

Regards,
Plamen Mitrev
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Robert
Top achievements
Rank 1
answered on 16 Dec 2019, 06:47 PM
[quote]Plamen Mitrev said:Hello Ivan,

Thank you for the test project that reproduces the misbehavior against a public page.

I have analyzed the test execution and I created a public bug report item on your behalf. We will investigate the issue further on our side and plan to fix it in our future releases. Please understand that at this point I am not able to promise you when the bug will be fixed.

Thank you for your feedback.

Regards,
Plamen Mitrev
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
[/quote]

Is there a planned release date for this fix? I'm running into the same issue when trying to test my environment.
0
Plamen Mitrev
Telerik team
answered on 17 Dec 2019, 01:36 PM

Hello Robert,

We are evaluating the feature requests and bug reports for every major release. The next one will be in early 2020 (probably March), but I can't promise that it will be included in that release. You can follow the public item to get notifications for its progress.

Thank you for your understanding.

Regards,
Plamen Mitrev
Progress Telerik

 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Ivan
Top achievements
Rank 1
Answers by
Ivan
Top achievements
Rank 1
Plamen Mitrev
Telerik team
Robert
Top achievements
Rank 1
Share this question
or