MarkRobbins

IE embedded border-radius not complying

3 posts in this topic

I have IE 10 installed, so I assume the embedded is using the same.

If I make a test html doc that has a DIV with inline style of "border-radius:8px 8px 8px 8px;" this radius works if I browse the file with normal IE 10 --- but if I am embedding IE in a form and using _IEPropertySet($oIE, 'innerhtml', $html) with the exact same html that is in the file, the border-radius does not work.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister()
Local $oIE = _IECreateEmbedded()

Global $thisfile="C:\batch\borg\TestCreeper.au3"
Global $logg="C:\$data\logs\TestCreeper-log.txt";
Global $timestamp=@YEAR&"."&@MON&"."&@MDAY&"."&@HOUR&"."&@MIN&"."&@SEC&"."&@MSEC


Global $f_w=800
Global $f_h=400

Global $hgui=GUICreate("Embedded Web control Test", $f_w, $f_h, _
        (@DesktopWidth - $f_w) / 2, (@DesktopHeight - $f_h) / 2, _
        $WS_POPUP)
GUICtrlCreateObj($oIE, -2, -2, $f_w+30, $f_h+8)

GUISetState() ;Show GUI

_IENavigate($oIE, "about:blank")
Global $st='body {  background-color:black;margin: 0; padding: 0; } '

Global $tx='Mary had a little lamb, little lamb, little lamb, little lamb, whose fleece was white as snow'


;THIS DOESNT WORK, SPECIFYING EACH INDIVIDUALLY
Global $br=BorderRadiusTxt(8)
;MsgBox(0,$thisfile,$br)

;NONE OF THE FOLLOWING WORK
$br='border-radius:8px;'
$br='-ms-border-radius:8px;'
$br='-webkit-border-radius:8px;'
$br='-moz-border-radius:8px;'

$br='border-radius:8px 8px 8px 8px;'
$br='-ms-border-radius:8px 8px 8px 8px;'
$br='-webkit-border-radius:8px 8px 8px 8px;'
$br='-moz-border-radius:8px 8px 8px 8px;'

;WORKS IN IE, BUT NOT IN EMBEDDED     <<<<<=== HERE
$br='border-radius:8px 8px 8px 8px;'

Global $t='';
$t&='<div style="position:absolute;'&$br&'border:1px solid green;background-color:black;padding:12px;color:#ccc;font-family:Tahoma;height:10px;top:10px;left:10px;">'

$t&=$tx
$t&='</div>'

Global $body_tags='border="0" marginheight="0" topmargin="0" vspace="0" marginwidth="0" leftmargin="0" hspace="0" '

Global $html='<HTML><HEAD><STYLE type="text/css">'&$st&'</STYLE></HEAD><BODY '&$body_tags&'>'&$t&'</BODY></HTML>'
;MsgBox(0,$thisfile,$html)
;ClipPut($html)

Global $r=_IEPropertySet($oIE,'innerhtml',$html)

; Waiting for user to close the window
While 1
    Local $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd

GUIDelete()









Func BorderRadiusTxt($i)
  Return 'border-top-left-radius:'&$i&'px;' & _
  'border-top-right-radius:'&$i&'px;' & _
  'border-bottom-left-radius:'&$i&'px;' & _
  'border-bottom-right-radius:'&$i&'px'
EndFunc

;;;;;;functions
Func ts()
  Return @YEAR&"."&@MON&"."&@MDAY&"."&@HOUR&"."&@MIN&"."&@SEC&"."&@MSEC
EndFunc
Func logline($line)
  Local $fh1=FileOpen($logg,1);
  If $fh1<>-1 Then
    FileWriteLine($fh1,$line)
    FileClose($fh1)
  EndIf
EndFunc

Share this post


Link to post
Share on other sites



I have IE 10 installed, so I assume the embedded is using the same.

If I make a test html doc that has a DIV with inline style of "border-radius:8px 8px 8px 8px;" this radius works if I browse the file with normal IE 10 --- but if I am embedding IE in a form and using _IEPropertySet($oIE, 'innerhtml', $html) with the exact same html that is in the file, the border-radius does not work.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister()
Local $oIE = _IECreateEmbedded()

Global $thisfile="C:\batch\borg\TestCreeper.au3"
Global $logg="C:\$data\logs\TestCreeper-log.txt";
Global $timestamp=@YEAR&"."&@MON&"."&@MDAY&"."&@HOUR&"."&@MIN&"."&@SEC&"."&@MSEC


Global $f_w=800
Global $f_h=400

Global $hgui=GUICreate("Embedded Web control Test", $f_w, $f_h, _
        (@DesktopWidth - $f_w) / 2, (@DesktopHeight - $f_h) / 2, _
        $WS_POPUP)
GUICtrlCreateObj($oIE, -2, -2, $f_w+30, $f_h+8)

GUISetState() ;Show GUI

_IENavigate($oIE, "about:blank")
Global $st='body {  background-color:black;margin: 0; padding: 0; } '

Global $tx='Mary had a little lamb, little lamb, little lamb, little lamb, whose fleece was white as snow'


;THIS DOESNT WORK, SPECIFYING EACH INDIVIDUALLY
Global $br=BorderRadiusTxt(8)
;MsgBox(0,$thisfile,$br)

;NONE OF THE FOLLOWING WORK
$br='border-radius:8px;'
$br='-ms-border-radius:8px;'
$br='-webkit-border-radius:8px;'
$br='-moz-border-radius:8px;'

$br='border-radius:8px 8px 8px 8px;'
$br='-ms-border-radius:8px 8px 8px 8px;'
$br='-webkit-border-radius:8px 8px 8px 8px;'
$br='-moz-border-radius:8px 8px 8px 8px;'

;WORKS IN IE, BUT NOT IN EMBEDDED     <<<<<=== HERE
$br='border-radius:8px 8px 8px 8px;'

Global $t='';
$t&='<div style="position:absolute;'&$br&'border:1px solid green;background-color:black;padding:12px;color:#ccc;font-family:Tahoma;height:10px;top:10px;left:10px;">'

$t&=$tx
$t&='</div>'

Global $body_tags='border="0" marginheight="0" topmargin="0" vspace="0" marginwidth="0" leftmargin="0" hspace="0" '

Global $html='<HTML><HEAD><STYLE type="text/css">'&$st&'</STYLE></HEAD><BODY '&$body_tags&'>'&$t&'</BODY></HTML>'
;MsgBox(0,$thisfile,$html)
;ClipPut($html)

Global $r=_IEPropertySet($oIE,'innerhtml',$html)

; Waiting for user to close the window
While 1
    Local $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd

GUIDelete()









Func BorderRadiusTxt($i)
  Return 'border-top-left-radius:'&$i&'px;' & _
  'border-top-right-radius:'&$i&'px;' & _
  'border-bottom-left-radius:'&$i&'px;' & _
  'border-bottom-right-radius:'&$i&'px'
EndFunc

;;;;;;functions
Func ts()
  Return @YEAR&"."&@MON&"."&@MDAY&"."&@HOUR&"."&@MIN&"."&@SEC&"."&@MSEC
EndFunc
Func logline($line)
  Local $fh1=FileOpen($logg,1);
  If $fh1<>-1 Then
    FileWriteLine($fh1,$line)
    FileClose($fh1)
  EndIf
EndFunc

Did u solve the problem? I'm facing the same issue...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • nassausky
      By nassausky
      Hi all,
       
      Anyone have any idea how to close all open tabs except a specific one I manually open.  Assuming I don't know what is open in all the tabs except just the one I want to keep open.
       
      I didn't want to use sendkeys and I was trying to use the following code to list the title (or url) of the 3 open tabs and  after I got that part working I would just close the other 2. This sample only displays the title of the first open tab
      #include <IE.au3> Const $ie_new_in_tab = 0x0800 $oIE = _IECreate("https://www.autoitscript.com") __IENavigate($oIE, "https://www.autoitscript.com/forum/", 1, $ie_new_in_tab) ;(obj,url,wait,param) __IENavigate($oIE, "https://www.google.com/", 1, $ie_new_in_tab) ;(obj,url,wait,param) Local $aIE[1] $aIE[0] = 0 Local $i = 1, $oIE While 1     $oIE = _IEAttach("", "instance", $i)     If @error = $_IEStatus_NoMatch Then ExitLoop     ConsoleWrite(_IEPropertyGet($oIE, "title") & @CRLF)     ReDim $aIE[$i + 1]     $aIE[$i] = $oIE ;each item holds object     $aIE[0] = $i ;first item holds count     $i += 1 WEnd MsgBox($MB_SYSTEMMODAL, "Browsers Found", "Number of browser instances in the array: " & $aIE[0]) ; This doesn't return the list of tabs in the console just the first tab  
      Thanks for any and all help
    • toto22
      By toto22
      I'm trying to click on Java Dropbox using IE. However, I'm running into problems. There is a Dropbox "Please Select" with two options "Buy" and "Sell".
      I'm able to click on a drop box (please see code below) but i'm unable to select "Buy" or "Sell"".
      Local $sMyString = "Please Select" ;############ ENTER ############# Local $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks Local $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $sMyString) Then _IEAction($oLink, "click") ExitLoop EndIf Next  
      Please help
       
         
    • Gowrisankar
      By Gowrisankar
      Hello everyone,
      I'm working on a task where, a PDF file is opened (in IE browser) when I click a link in a website.
      I have to read the first page of the PDF to find particular strings. Can you please share some ideas?
    • Seminko
      By Seminko
      Hey,
      i would like to set a value into an INPUT field.
      Checked the _IEFormElementSetValue function but that does require _IEFormGetObjByName and this is where the problem comes in. The input field I want to write to is not a part of a form tag. It is part of a table.
      <input type="text" class="w2" id="nabidka_vozidel_formular_tach_od" name="nabidka_vozidel_formular_tach_od" onchange="GLOBAL.pocetInzerceNZ(&quot;nabidka_vozidel_formular&quot;,&quot;tach_od&quot;,&quot;&quot;);" autocomplete="off"> I tried this but that didn't work:
      $oDownloadSamples = _IEGetObjById($oIE, "nabidka_vozidel_formular_tach_od") _IEFormElementSetValue($oDownloadSamples, "123") If you want to try the site I'm working with is https://www.tipcars.cz/. There is a menu on the top left hand side and if you click the "vyhledat" button the input fields will show up.
      Thanks
    • Seminko
      By Seminko
      I am now able to populate the dropdown menus at https://www.tipcars.com/.
      The dropdowns are dynamic and do not have a Text value, only ids.
      Is there a way to get all the available options from a dropdown?
      $url = "https://www.tipcars.com/" $oIE = _IECreate($url) _IELoadWait($oIE) $oDownloadSamples = _IEGetObjById($oIE, "homepage_vyhl_frm_vozidlo") _IEFormElementOptionSelect($oDownloadSamples, "C") Above code, populates ID 'C' into the 'druh' dropdown, which results in selecting 'užitkové'. 
      Is there a way so I can grab all of the options from the dropdown menu? I could easily grab all the IDs but I am afraid they will change in the future so I would much rather match the text titles and assign the option IDs grabbed from site.
      This is what the options are according to Chrome:
      <select class="w1"id="homepage_vyhl_frm_vozidlo"name="homepage_vyhl_frm_vozidlo"onchange="try{NABIDKA_VOZIDEL_FORMULAR.naplnSelectZnacka('homepage_vyhl_frm');GLOBAL.pocetInzerceHZ('homepage_vyhl_frm','vozidlo');}catch(ex){odeslatJsChybu('formHOMEPAGE onChange 1: ' + ex.message, 'formHomePage onChange 1', -1);}"> <option value="A" style="color: black;">osobní a terénní (56 334)</option> <option value="C" style="color: black;">užitkové (4 333)</option> <option value="D" style="color: black;">nákladní (3 742)</option> <option value="E" style="color: black;">autobusy (56)</option> <option value="F" style="color: black;">obytné (373)</option> <option value="G" style="color: black;">přívěsy (1 179)</option> <option value="J" style="color: black;">motorky (780)</option> <option value="S" style="color: black;">pracovní stroje (605)</option> <option value="L" style="color: black;">ostatní (235)</option></select> Also, this cannot be grabbed by _INetGetSource.
      Thanks