how exactly should I resize the browser window in test complete?
I tried it with BrowserWindow.Position(0,0,width,1000) in a function where I give the width as parameter ... But it sets the window size to idk 1697 or something rather than my 1710 I sent to the function.
Is there a better way to resize the BrowserWindow during runtime?
This can not work @royd because this solutions sets the Browser size, so the content is set to whatever is left.
You need to check the different borders, as in chrome it is around 30px, in firefox around 25px, in edge only 10px so if you use .Position it only makes the outer lines of the browser to 1400 width - but I needed the content to be at least 1400px.
My problem right now is with Edge @AlexKaras did you test Edge already with your provided code? For me the wnd.width - page.width says = 0 because the variables seem to be the same on MicrosoftEdge ... Not sure what I should do here, I made it now If Browser Edge => add 9,8px as this is the standard Edge Border size, which is fairly cheap and cheated, but works ... Do you have a better solution for this problem probably?
-- The screenshot taken via Alt-PrnScr for the Edge window and pasted into both Paint and IrfanView is reported as an image of 1339 pixels width.
@HKosova, @TanyaGorbunova could you please ask Support guys to look into this? Or this needs to be reported as an issue?
Regards, /Alex [Community Hero] ____ [Community Heroes] are not employed by SmartBear Software but are just volunteers who have some experience with the tools by SmartBear Software and a desire to help others. Posts made by [Community Heroes] may differ from the official policies of SmartBear Software and should be treated as the own private opinion of their authors and under no circumstances as an official answer from SmartBear Software. The [Community Hero] signature is used with permission by SmartBear Software. https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame ================================
the 9.8 px is what I have found out is the "Border" MicrosoftEdge actually has, so right now my script only makes "if browser = Edge" iBorderWidth += 9.8 this way it creates the content right (but yeah this is a very dirty solution 😛 )