假设我有以下标记
<div class="xxx yyy zzz"> <!-- This div is generated by JS and the class names change all the time -->
<div class="aaa"> Hello </div>
</div>
如何在不知道父div的类名的情况下仅使用css来定位父div的CSS?
Ex: parent.aaa { background: #fff; }
我正在使用webdriverjs,我希望获得一个webelement.There的父id是多个类,称为row,但每个类都有一个不同的id。挑战是在发送消息时生成ID。这样我就可以按类获取innerHtml,然后尝试获取Id。我有下面的html
<div class="row" id="4003">
<div class="client-chat">
<p class="client-chat-text">If you have any questions, don’t hesitate to m
<?php
class HTML
{
protected $name;
public $id;
private $with;
protected function basicAttribute()
{
return "name='$this->name' id='$this->id'";
}
}
Class HTML_div extends HTML
{
public function __construct($id , $name)
{
$this->id = $id;
$this->name = $name;
}