我们可以使用splinter,漂亮的汤或硒来更改css,html值吗? [英] can we change the css , html values using splinter , beautiful soup or selenium?

查看:127
本文介绍了我们可以使用splinter,漂亮的汤或硒来更改css,html值吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用以下方法更改任何html,css的值吗? 像我们可以使用检查元素那样分裂或硒化:

can i change the value of any html , css thing using splinter or selenium like we can do with inspect element :

  `<form action="/action_page.php"
oninput="x.value=parseInt(a.value)+parseInt(b.value)">
  0
  <input type="range" id="a" name="a" value="50">
  100 +
  <input type="number" id="b" name="b" value="50">
  =
  <output name="x" for="a b"></output>
  <br><br>
  <input type="submit">
</form>`

我可以选择<input type="range" id="a" name="a" value="50"> 并可以使用碎片或硒来更改值="30"?

can i select <input type="range" id="a" name="a" value="50"> and can change the value="30" by using splinter or selenium ?

就像这是html代码一样:

Like if this is html code :

<div class="medium-widget success-story-category">
                        <h2 class="widget-title"><span aria-hidden="true" class="icon-get-started"></span>Getting Started</h2>
<p>Python can be easy to pick up whether you're a first time programmer or you're experienced with other languages. The following pages are a useful first step to get on your way writing programs with Python!</p>
<ul>
    <li><a href="https://wiki.python.org/moin/BeginnersGuide/Programmers">Beginner's Guide, Programmers</a></li>
    <li><a href="https://wiki.python.org/moin/BeginnersGuide/NonProgrammers">Beginner's Guide, Non-Programmers</a></li>
    <li><a href="https://wiki.python.org/moin/BeginnersGuide/Download">Beginner's Guide, Download &amp; Installation</a></li>
    <li><a href="https://wiki.python.org/moin/BeginnersGuide/Examples">Code sample and snippets for Beginners</a></li>
</ul>

                    </div>

  • 我可以将<p>标签更改为<h1>吗?

    • can i change <p> tag to <h1> ?

      我们可以在现有标签中添加一些内容吗,例如<p>标签到

      <p style="color:red;">吗?

      can we add something to existing tag like <p> tag to

      to <p style="color:red;"> ?

      我试图看问题,但尚未找到解决方案.

      I tried to look this question but have not found the solution.

      推荐答案

      您无法使用这些工具来做到这一点.您需要使用JavaScript.

      You can't do that with those tools. You need to use JavaScript.

      这篇关于我们可以使用splinter,漂亮的汤或硒来更改css,html值吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆