複数のテーブル内に要素を持つ次のセレン CSS コードを省略できません。以下のコードでは、2 つのチェックボックスが表示されます。
table[id$=gridReports]>tbody>tr:nth-of-type(2)>td:nth-of-type(2)>table[id$=panelReportInformation]>tbody>tr:nth-of-type(2)>td>table[id$=panelReportContent]>tbody>tr:nth-of-type(2)>span[id$=reportCheckBox] input
同じスパンとチェックボックスを持つ別のテーブルもあるため、このコードは使用できません。唯一の違いは、それが別の行にあることです。したがって、別のチェックボックスのコードを配置すると、次のようになります。
table[id$=gridReports]>tbody>tr:nth-of-type(3)>td:nth-of-type(2)>table[id$=panelReportInformation]>tbody>tr:nth-of-type(2)>td>table[id$=panelReportContent]>tbody>tr:nth-of-type(2)>span[id$=reportCheckBox] input
したがって、唯一の違いは、すべてのテーブルの nth-of-type(i) です。では、CSS コードを短くするにはどうすればよいでしょうか。
table[id$=gridReports]>tbody>tr:nth-of-type(i) の後に span[id$=reportCheckBox] 入力のように短縮できるオプションはありますか。
どんな助けでも大歓迎です。
ありがとう