Skip to content

Commit

Permalink
try with from string
Browse files Browse the repository at this point in the history
Issue #239
  • Loading branch information
damies13 committed Oct 16, 2024
1 parent 9d35990 commit ff3099e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Tests/Regression/Reporter/GUI_Bugs.robot
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ Template with Start and End Dates
# ${html}= Parse XML ${resultfolder0}${/}${resultdata0}.html
# import lxml.etree
# tree = lxml.etree.parse("/home/dave/Downloads/Reporter-windows-latest-3.11/Issue-#250/20240626_130059_jpetstore-nomon-quick/20240626_130059_jpetstore-nomon-quick.html", lxml.etree.HTMLParser())
${html}= Evaluate lxml.etree.parse("${resultfolder1}${/}${resultdata1}.html", lxml.etree.HTMLParser()) modules=lxml.etree
# ${html}= Evaluate lxml.etree.parse("${resultfolder0}${/}${resultdata0}.html", lxml.etree.HTMLParser()) modules=lxml.etree
${rawhtml}= Get File ${resultfolder0}${/}${resultdata0}.html
${html}= Evaluate lxml.etree.fromstring(${rawhtml}, lxml.etree.HTMLParser()) modules=lxml.etree
${sectionid}= Get Element Attribute ${html} id .//h1[text()='2 Test Result Summary']/..
${table}= Get Element ${html} .//div[@id='${sectionid}']//table
${expected}= Get Elements Texts ${table} tr/td[1]
Expand All @@ -288,7 +290,9 @@ Template with Start and End Dates
Copy Files ${resultfolder1}/*.html ${testresultfolder1}

# ${html}= Parse XML ${resultfolder1}${/}${resultdata1}.html
${html}= Evaluate lxml.etree.parse("${resultfolder1}${/}${resultdata1}.html", lxml.etree.HTMLParser()) modules=lxml.etree
# ${html}= Evaluate lxml.etree.parse("${resultfolder1}${/}${resultdata1}.html", lxml.etree.HTMLParser()) modules=lxml.etree
${rawhtml}= Get File ${resultfolder1}${/}${resultdata1}.html
${html}= Evaluate lxml.etree.fromstring(${rawhtml}, lxml.etree.HTMLParser()) modules=lxml.etree
${sectionid}= Get Element Attribute ${html} id .//h1[text()='2 Test Result Summary']/..
${table}= Get Element ${html} .//div[@id='${sectionid}']//table
FOR ${index} ${item} IN ENUMERATE @{expected}
Expand Down

0 comments on commit ff3099e

Please sign in to comment.