我试图将硒第一次导入我的新Python项目中。但是,当我运行该程序时,它不起作用,并在下面显示以下消息。
我检查了python和selenium是否正确安装。我什至尝试重新安装它,但仍然显示相同的消息。我刚开始使用Python和Selenium时,可能在某个地方犯了一个愚蠢的错误。有人有解决方案吗?
我的代码:
You can add the code in the blade to retrieve all the products from the product model
<div class="row">
@php
$product = App\Product::all();
@endphp
@foreach($product as $data)
<div class="col-lg-4 col-md-6 mb-4">
<div class="card h-100">
<a href="#"><img src="{{ asset('image/product_image/'.$data->product_image) }}" alt="photo"></a>
<div class="card-body">
<h4 class="card-title">
<a href="#">{{ $data->product_name }}</a>
</h4>
<h5>{{ $data->product_price }}</h5>
<p class="card-text">{{ $data->product_description }}</p>
</div>
<div class="card-footer">
<small class="text-muted">★ ★ ★ ★ ☆</small>
</div>
</div>
</div>
@endforeach
<!-- /.row -->
</div>
这是输出:
from selenium import webdriver
from selenium.webdriver.comma.keys import Keys
driver = webdriver.Firefox()
driver.get("http://www.python.org")
答案 0 :(得分:2)
尝试共同点:
from selenium.webdriver.common.keys import Keys